Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/conv-tmpl2.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 // PR c++/92031 - bogus taking address of rvalue error. | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 struct x { const int& l; }; | |
5 | |
6 void a(const x&) {} | |
7 | |
8 template<class E> | |
9 void f() { | |
10 a(x { 0 }); | |
11 } | |
12 | |
13 void g() { | |
14 a(x { 0 }); | |
15 } | |
16 | |
17 void | |
18 test () | |
19 { | |
20 f<int>(); | |
21 } |