This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++, 2.95: Maybe bug with nested template specialization (variant)


On Aug 12, 1999, Wolfgang Bangerth <wolf@gaia.iwr.uni-heidelberg.de> wrote:

> // this is something for which I have no clue what the compiler
> // explains about:

First, you can't specialize in non-namespace scope, as I explained in
my previous message.

But then, moving the template out of X gets you:

template <class Y> template <> class X<Y>::T<1> { int i1; };

This is not valid, because you can only specialize template-members of
full specializations of a template.  I.e., you can do:

template <> template <> class X<some_type>::T<1> ...

because X<some_type> is fully specialized.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]