aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
new file mode 100644
index 000000000..eac6004ae
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
@@ -0,0 +1,20 @@
+// PR c++/59268
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+template <typename>
+struct A
+{
+ constexpr A (int) {}
+ virtual void foo ()
+ {
+ constexpr A<void> a (0);
+ }
+};
+
+void
+bar ()
+{
+ A<int> a (3);
+ a.foo ();
+}