Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/initlist38.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // DR 990 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 #include <initializer_list> | |
5 | |
6 struct A { | |
7 A(std::initializer_list<int>); // #1 | |
8 }; | |
9 struct B { | |
10 A a; | |
11 }; | |
12 | |
13 void f (B); | |
14 int main() | |
15 { | |
16 B{}; | |
17 f({}); | |
18 B b0 = { }; | |
19 B b1 { }; // OK, uses #1 | |
20 B b2 { 1 }; // { dg-error "could not convert" } | |
21 } |