aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist-defarg1.C
blob: 45eb2d5e1f03d17509b4af87a8405937357a15ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// PR c++/56614
// { dg-require-effective-target c++11 }

#include <initializer_list>

namespace std
{
    template<typename T>
        struct allocator
        { };

    template<typename T, typename Alloc = std::allocator<T> >
        struct vector
        {
            vector(std::initializer_list<T>, const Alloc& = Alloc()) { }
        };
}

void func() { }

enum E { ee };

struct C
{
    template<typename T>
        C(T, std::vector<E> = std::vector<E>({ ee }))
        { }
};

struct G
{
    void gen()
    {
        C c(&func);
    }
};