summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist32.C
blob: 78bbb5ef9964d1b5069e7d5911ab48da0e35d106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Test that we try normal init if no list ctor is viable.
// { dg-options "-std=c++0x" }

#include <initializer_list>

struct B {};

struct C
{
  C(B);
};

struct A
{
  A(std::initializer_list<int>);
  A(B) { }
  A(C);
};

B b;
A a{b};