public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27424]  New: [4.0/4.1/4.2 regression] Valid template-template-parameter rejected
@ 2006-05-04 15:25 reichelt at gcc dot gnu dot org
  2006-05-04 15:27 ` [Bug c++/27424] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-04 15:25 UTC (permalink / raw)
  To: gcc-bugs

The C++ frontend rejects the following IMHO valid code snippet since GCC 3.4.0:

==================================================
template<typename T> struct A
{
    template<template<T> class> struct B {};
    template<T> struct C;
    B<C> b;
};

A<int> a;
==================================================

bug.cc: In instantiation of 'A<int>':
bug.cc:8:   instantiated from here
bug.cc:5: error: type/value mismatch at argument 1 in template parameter list
for 'template<class T> template<template<template<T <anonymous> >
class<template-parameter-2-1> > template<class T> template<T <anonymous> >
class<template-parameter-2-1> > struct A<T>::B'
bug.cc:5: error:   expected a template of type 'template<class T> template<T
<anonymous> > class<template-parameter-2-1>', got 'template<int <anonymous> >
struct A<int>::C'

The code compiles if I replace T by int inside A.


-- 
           Summary: [4.0/4.1/4.2 regression] Valid template-template-
                    parameter rejected
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27424


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-06-30 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 15:25 [Bug c++/27424] New: [4.0/4.1/4.2 regression] Valid template-template-parameter rejected reichelt at gcc dot gnu dot org
2006-05-04 15:27 ` [Bug c++/27424] " pinskia at gcc dot gnu dot org
2006-05-05 15:30 ` pinskia at gcc dot gnu dot org
2006-06-04 18:46 ` mmitchel at gcc dot gnu dot org
2006-06-26 22:21 ` jason at gcc dot gnu dot org
2006-06-29  1:29 ` jason at gcc dot gnu dot org
2006-06-30 14:31 ` [Bug c++/27424] [4.0/4.1 " jason at gcc dot gnu dot org
2006-06-30 15:20 ` [Bug c++/27424] [4.0 " pinskia at gcc dot gnu dot org
2006-06-30 18:33 ` jason at gcc dot gnu dot org
2006-06-30 18:37 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).