summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C
new file mode 100755
index 0000000..1bd40b6
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/spec26.C
@@ -0,0 +1,11 @@
+// From: lat@iki.fi (Lassi A. Tuura)
+// Test that a specialization without an initializer is not a definition,
+// as specified in [temp.expl.spec].
+
+// Build don't link:
+
+struct X;
+template <class T> struct Y { static const X array[]; };
+template <> const X Y<int>::array [];
+struct X { int i; };
+template <> const X Y<int>::array [] = { 0, 1, 2, 3 };