This is the mail archive of the gcc@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: template question.


Satish  <satish@dakotacom.net> writes:

> Foo<Bar *>::Foo(void)               /var/tmp/cc0wXca01.o

Templates must be defined in every translation unit in which they're
used, unless you explicitly instantiate them.

> Also, the presence of def. for operator<< (comments removed)
> causes the following error, where I expected it to work just fine..

Check http://egcs.cygnus.com/faq.html#friend

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org 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]