* pt.c (dependent_type_p_r): A template template parameter is a
dependent type.
PR c++/14284
* g++.dg/template/ttp8.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78522
138bc75d-0d04-0410-961f-
82ee72b054a4
2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+ PR c++/14284
+ * pt.c (dependent_type_p_r): A template template parameter is a
+ dependent type.
+
+2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
PR c++/14246
* mangle.c (write_template_arg_literal): Don't rely on identity for
boolean constants.
A type is dependent if it is:
- -- a template parameter. */
- if (TREE_CODE (type) == TEMPLATE_TYPE_PARM)
+ -- a template parameter. Template template parameters are
+ types for us (since TYPE_P holds true for them) so we
+ handle them here. */
+ if (TREE_CODE (type) == TEMPLATE_TYPE_PARM
+ || TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM)
return true;
/* -- a qualified-id with a nested-name-specifier which contains a
class-name that names a dependent type or whose unqualified-id
+2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/14284
+ * g++.dg/template/ttp8.C: New test.
+
2004-02-26 Eric Botcazou <ebotcazou@act-europe.fr>
* gcc.dg/fixuns-trunc-1.c: New test.
--- /dev/null
+// { dg-do compile }
+// Contributed by: Niall Douglas <s_gccbugzilla at netprod dot com>
+// PR c++/14284: Failure to select specialization
+
+template<typename> struct S;
+template<template<class> class> struct I {};
+
+template<class, int> struct Match;
+
+template<template<class> class C>
+struct Match<I<C>, 0> {};
+
+template<template<class> class C, int i>
+struct Match<I<C>, i>;
+
+Match<I<S>, 0> v;