This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: Code compiles with g++ 3.3 but not g++ 4.4


Hi,
> 
> > If you explicitely instantiate the template member function, it will
> > work:
> > template class Graph<int,int,int>::Graph(int, int, void (*)(char *));
> > 
> 
> Thanks for the quick reply! However, When I add that line to the bottom of
> instances.inc and try to compile, I get:
> 
> In file included from graph.cpp:2:
> instances.inc:6: error: expected unqualified-id before âintâ
> instances.inc:6: error: expected â)â before âintâ
Sorry, my mistake.
template class Graph<int,int,int>::Graph(int, int, void (*)(char *));
was wrong;-) the "class" was too much. Try only
template Graph<int,int,int>::Graph(int, int, void (*)(char *));


Axel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]