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 friend/template/inline link-failure


Mark Mitchell <mark@markmitchell.com> writes:

> template <class P1> struct S1 { struct SS1 { };
>   friend void Foo (const SS1& ss1) { } };

In this case, I think Foo is a non-template function, so it must be
explicitly defined for each type S1<P1>::SS1.  A template definition
won't do.

-- 
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]