This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template with friend function problem
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: template with friend function problem
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 20 Mar 2000 23:36:34 -0300
- Cc: yelistratov at gmd dot de, gcc at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <38D638B1.A1C0E542@gmd.de> <200003202221.XAA00843@loewis.home.cs.tu-berlin.de>
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