Problems with pointer and templates

Pascal Francq pfrancq@ulb.ac.be
Tue Dec 21 17:20:00 GMT 1999


I have a template class with a template function declare like:
template<class C> class Cont
{
public:
    Cont(void) {}
    template<class G> DoSomething(const G &param)
{}
};
I declare a pointer to Cont:
Cont *ptr=new Cont();
When i try the following instruction, gcc gives me an error ("parse
error before '>')
ptr->DoSomething<int>(3);
Note: When I compile this code with a compiler like the one of borland,
there are no problems.
-- 


Ir. Pascal Francq
Researcher
Université Libre de Bruxelles
Faculty of Applied Mechanics
Avenue F.D. Roosevelt, 50
CP 165/41
B-1050 Brussels
BELGIUM
Tel. +32-2-650 47 65
Fax +32-2-650 27 10
 




More information about the Gcc-help mailing list