aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
new file mode 100644
index 0000000..b949bd6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
@@ -0,0 +1,27 @@
+// PR c++/50248, DR 1358
+// { dg-do compile { target c++11 } }
+
+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;
+}