This is the mail archive of the gcc-patches@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: PATCH for error-recovery on bad member-template declarations


Mark Mitchell <mark@markmitchell.com> writes:

>>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:
Alexandre> Mark Mitchell <mark@markmitchell.com> writes:

>>> template <class A, class B> void foo(); template <class C>
>>> class bar { int i; !  template <class B> friend void
>>> foo<C,B>(); // ERROR - bogus declaration };

Alexandre> Can you support this claim?  I couldn't find any
Alexandre> indication that this is valid or invalid in the
Alexandre> Standard :-(

> Thought we already went around on this.  There is no such thing as
> partial specialization of function templates, which is essentially
> what this is.

Yes, I think you're right.  The Standard doesn't even mention the
possibility of doing what I wanted.  But it would be really nice to be
able to do that. :-(

Well, there are possible workarounds...

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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