This is the mail archive of the
mailing list for the GCC project.
a compiation issue with gcc
- From: Damanjit Singh <damanjit81 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 19 May 2005 17:42:49 +0530
- Subject: a compiation issue with gcc
- Reply-to: Damanjit Singh <damanjit81 at gmail dot com>
The following code does not compile with gcc (ggc -c simple.cpp) and
gives the following errors ( where as the code compiles in windows
Could someone tell me the reason for this, and if there is an
template <class T,void (*DestroyCallback)( T )> class B
template <class T> class A
static void ASFreeWrapper( T Ptr )
free( Ptr );
typedef B<T,&ASFreeWrapper> Type;
A<int *> a;
/* Here is the error reported by gcc -
simple.cpp:9: warning: all member functions in class `A<T>' are private
simple.cpp: In instantiation of `A<int*>':
simple.cpp:21: instantiated from here
simple.cpp:16: invalid use of undefined type `class A<int*>'
simple.cpp:9: declaration of `class A<int*>'