gcc and template

codaditasso@tiscali.it codaditasso@tiscali.it
Sat Nov 22 11:20:00 GMT 2003


Hello
I've tried to compile the following program with gcc:

1 template <class T> void
2 my_fun1(){
3 my_fun2<T>();
4 };
5
6 template <class T> void
7 my_fun2(){
8 T prova=1234;
9 };
10
11 int main()
12 {
13 my_fun1<float>();
14
15 return 0;
16 }

but the compiler tell me that there is syntax error before > in line 3.
Anyway with the c++ builder the program was compiled correctly. What's the
problem? Also with the mingw i've obtained the same compile error?
In the gcc are not possible to call a template function with in another?


Greetings from pinzi

__________________________________________________________________
Tiscali ADSL SENZA CANONE, paghi solo quando navighi!
E in più il modem e' GRATIS! Abbonati subito.
http://point.tiscali.it/adsl/index.shtml





More information about the Gcc-help mailing list