Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/initlist-ref-2267.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // CWG 2267 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 struct A {} a; | |
5 struct B { explicit B(const A&); }; | |
6 B b1(a); // #1, ok | |
7 const B &b2{a}; // { dg-error "" } | |
8 const B &b3(a); // { dg-error "" } | |
9 | |
10 struct D { D(); }; | |
11 struct C { explicit operator D(); } c; | |
12 D d1(c); // ok | |
13 const D &d2{c}; // { dg-error "" } | |
14 const D &d3(c); // { dg-error "" } |