aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C10
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1aecad0..1a872ff 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/52343
+ * pt.c (check_instantiated_arg): Allow type template arguments.
+
2013-01-04 Jason Merrill <jason@redhat.com>
PR c++/55877
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 09a0aa5..30bafa0 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -14419,6 +14419,9 @@ check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain)
return true;
}
}
+ /* Class template and alias template arguments should be OK. */
+ else if (DECL_TYPE_TEMPLATE_P (t))
+ ;
/* A non-type argument of integral or enumerated type must be a
constant. */
else if (TREE_TYPE (t)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0f15221..217e40f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/52343
+ * g++.dg/cpp0x/alias-decl-29.C: New test.
+
2013-01-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/PR53876
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C
new file mode 100644
index 0000000..f6cc695
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C
@@ -0,0 +1,10 @@
+// Origin: PR c++/52343
+// { dg-do compile { target c++11 } }
+
+template<typename>
+using A = int;
+
+template<template<class> class>
+struct B {};
+
+B<A> b;