template with friend function problem
Alexandre Oliva
aoliva@cygnus.com
Mon Mar 20 18:42:00 GMT 2000
On Mar 20, 2000, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> wrote:
>> What is wrong with my instantiation of friend functions?
> In C++, at the point of instantiation, the definition of a template
> function (or class) must be visible
I had just finished writing a message with identical content to yours
when I noticed that this was the case with his code: instantiate.cpp
did include Vector.C, so the definition was available at the point of
instantiation.
So, unless instantiation.o was not included in library, there is a bug
in gcc.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Gcc
mailing list