summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist38.C
blob: 32e20d591c7ff3f58ab91e882d6b41710b983f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// DR 990
// { dg-options "-std=c++0x" }

#include <initializer_list>

struct A {
  A(std::initializer_list<int>);  // #1
};
struct B {
  A a;
};

void f (B);
int main()
{
  B{};
  f({});
  B b0 = { };
  B b1 { };    // OK, uses #1
  B b2 { 1 };  // { dg-error "could not convert" }
}