Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/initlist-defarg1.C

raw
1 // PR c++/56614
2 // { dg-require-effective-target c++11 }
3
4 #include <initializer_list>
5
6 namespace std
7 {
8 template<typename T>
9 struct allocator
10 { };
11
12 template<typename T, typename Alloc = std::allocator<T> >
13 struct vector
14 {
15 vector(std::initializer_list<T>, const Alloc& = Alloc()) { }
16 };
17 }
18
19 void func() { }
20
21 enum E { ee };
22
23 struct C
24 {
25 template<typename T>
26 C(T, std::vector<E> = std::vector<E>({ ee }))
27 { }
28 };
29
30 struct G
31 {
32 void gen()
33 {
34 C c(&func);
35 }
36 };