diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C new file mode 100644 index 0000000000..88077231b0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C @@ -0,0 +1,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; +} |