re PR c++/14284 (Failure to select obvious template specialisation)
PR c++/14284 * pt.c (dependent_type_p_r): A template template parameter is a dependent type. PR c++/14284 * g++.dg/template/ttp8.C: New test. From-SVN: r78522
This commit is contained in:
parent
48c0150c23
commit
6bf92cb609
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -11544,8 +11544,11 @@ dependent_type_p_r (tree type)
|
||||
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
16
gcc/testsuite/g++.dg/template/ttp8.C
Normal file
16
gcc/testsuite/g++.dg/template/ttp8.C
Normal file
@ -0,0 +1,16 @@
|
||||
// { 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;
|
Loading…
Reference in New Issue
Block a user