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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux