aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/template3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/template3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/template3.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/template3.C b/gcc/testsuite/g++.old-deja/g++.law/template3.C
new file mode 100644
index 00000000000..7523824864e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.law/template3.C
@@ -0,0 +1,17 @@
+// Build don't link:
+// GROUPS passed templates
+template< class R, class T1 = R, class T2 = T1 >
+struct plus
+ {
+ R operator()( const T1& x, const T2& y ) const
+ {
+ return x + y;
+ }
+ };
+
+int
+main()
+ {
+ plus< int > p;
+ return 0;
+ }