Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C

raw
1 // PR c++/50248, DR 1358
2 // { dg-do compile { target c++11 } }
3
4 template<class Elt, unsigned max>
5 struct earray
6 {
7 Elt elts[max];
8 earray() = default;
9 template<typename... Elt2>
10 constexpr earray(Elt2&& ... e): elts(0) { }
11 };
12
13 struct SessionData
14 {
15 SessionData(SessionData&) = delete;
16 SessionData() = default;
17 };
18
19 struct MapSessionData : SessionData
20 {
21 earray<short, 11> equip_index;
22 };
23
24 void test()
25 {
26 MapSessionData *sd = new MapSessionData;
27 }