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

struct A1 { };
struct A2 {
  A2();
};

template <class T> struct B {
  T ar[1];
  B(T t):ar({t}) {}
};

int main(){
  B<int> bi{1};
  A1 a1;
  B<A1> ba1{a1};
  A2 a2;
  A2 a2r[1]{{a2}};
  B<A2> ba2{a2};
}