aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/defarg11.C
diff options
context:
space:
mode:
authorRafael Espindola <espindola@google.com>2009-04-20 14:09:46 +0000
committerRafael Espindola <espindola@google.com>2009-04-20 14:09:46 +0000
commitee7d4fba3eb1fe0ef18f4badf1fd71100c99309c (patch)
tree9c8d314cc606457ab4eb9ddec739f1c5d2c92008 /gcc/testsuite/g++.dg/template/defarg11.C
parent20ccb780d272cc40cbb95191d5adf63bd7aa4842 (diff)
2009-04-20 Rafael Avila de Espindola <espindola@google.com>plugins
Merge with mainline @146369. * configure.ac (ACX_PKGVERSION): Update. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/plugins@146426 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/template/defarg11.C')
-rw-r--r--gcc/testsuite/g++.dg/template/defarg11.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/defarg11.C b/gcc/testsuite/g++.dg/template/defarg11.C
new file mode 100644
index 00000000000..00c4e658d9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/defarg11.C
@@ -0,0 +1,18 @@
+// { dg-do compile }
+
+// We used to reject this code as the extension
+// for default arguments being accepted as less the
+// needed template arguments.
+
+
+template<typename> struct match { };
+
+template<template<typename> class t,typename T>
+struct match<t<T> > { typedef int type; };
+
+template<template<typename,typename> class t,typename T0,typename T1>
+struct match<t<T0,T1> > { typedef int type; };
+
+template<typename,typename =void> struct other { };
+
+typedef match<other<void,void> >::type type;