Topic: template function as member function


Author: zhou@igd.fhg.de (Zhou Jian)
Date: 24 May 94 11:26:24 GMT
Raw View
Hi Everyboody,

can anyone tell me whether it is possible
to use a template function as a member function?
such as:

template<class T> class TMP{
        T s[10];
};

class C1 {
        int i;
public:
        C1();
        ~C1();
        template<class T> void f1(TMP<T>);
};

My compiler(centerline C++ with cfront3.0) always complains
about:

"test2.cxx", line 10: error: non-friend  parameterized type
declaration must be at global, not class scope
"test2.cxx", line 10: sorry, cannot recover from earlier errors
2 errors

Thankx

Jian

 _________________________________________________________________________
|   |   |_|_|_|_|                                                         |
|___|___|_|_|_|_|  Fraunhofer Institute for Computer Graphics             |
|   |   |_|_|_|_|                                                         |
|___|___|_|_|_|_|  Jian Zhou            email : zhou@igd.fhg.de           |
|  /--- /   /---|  Wilhelminenstr. 7    phone : (+49) 6151-155-131        |
| /--  /_  / __ |  D-64283 Darmstadt    fax   : (+49) 6151-155-199        |
|/    / / /___/ |  Germany                                                |
|_______|_______|_________________________________________________________|