summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit37.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit37.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit37.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
new file mode 100644
index 000000000..f3d9f64d6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit37.C
@@ -0,0 +1,23 @@
+// { dg-do link }
+// GROUPS passed templates
+class ostream {};
+
+template <class T>
+class S;
+
+template <class T>
+void operator<<(ostream&, S<T>) {}
+
+template <class T>
+class S
+{
+ friend void operator<<<>(ostream&, const S<T>);
+};
+
+
+int main()
+{
+ ostream o;
+
+ o << S<int>();
+}