a piece of code under egcs
Josip Rodin
joy@cibalia.gkvk.hr
Mon Mar 15 10:34:00 GMT 1999
Hi,
I apologize if this is not the right place to ask this question;
please point me to the right source of information if that is the
case.
I have here a program that (author says so) compiles under gcc 2.8.
Under my EGCS g++ 2.91.60 it doesn't work:
c++ -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -g -O2 -Wall -fno-implicit-templates -c Collection.cc
Collection.h: In function `class SCollection<T> * create(class File &)':
In file included from Collection.cc:22:
Collection.h:180: use of class template `template <class T> SCollection<T>' as expression
make[2]: *** [Collection.o] Error 1
Here is that part of the code from Collection.h:
template <class T> static SCollection<T>* create(class File& f)
{
SCollection* sc = new SCollection<T>();
if(!sc->read(f)) { delete sc; return 0; }
return sc;
}
Please CC: me in your answers, I'm not subscribed to this list.
Thanks for any help.
--
enJoy -*/\*- http://jagor.srce.hr/~jrodin/
More information about the Gcc
mailing list