gcc and template

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

 



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





[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