summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
blob: 88077231b0ddec0550fa6f1a3c83a729614e7704 (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
// PR c++/50248, DR 1358
// { dg-options -std=c++0x }

template<class Elt, unsigned max>
struct earray
{
    Elt elts[max];
    earray() = default;
    template<typename... Elt2>
    constexpr earray(Elt2&& ... e): elts(0) { }
};

struct SessionData
{
    SessionData(SessionData&) = delete;
    SessionData() = default;
};

struct MapSessionData : SessionData
{
    earray<short, 11> equip_index;
};

void test()
{
    MapSessionData *sd = new MapSessionData;
}