summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C b/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C
new file mode 100644
index 000000000..25354b3a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C
@@ -0,0 +1,14 @@
+// PR c++/48707
+// { dg-options -std=c++0x }
+
+struct A {
+ static int a();
+};
+
+template<typename X>
+struct B: A {
+ static int const b;
+};
+
+template<typename X>
+int const B<X>::b=B<X>::a();