This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++, 2.95: Maybe bug with nested template specialization (variant)
- To: Wolfgang Bangerth <wolf at gaia dot iwr dot uni-heidelberg dot de>
- Subject: Re: C++, 2.95: Maybe bug with nested template specialization (variant)
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 12 Aug 1999 20:36:25 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <199908122125.XAA00706@mira.isdn.cs.tu-berlin.de>
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