This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[egcs-971114] invalid member template declaration ?
- To: egcs at cygnus dot com
- Subject: [egcs-971114] invalid member template declaration ?
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Date: Sun, 30 Nov 1997 17:29:20 +0100 (MET)
Hi all !
Consider :
% cat toto.C
template<class T> class allocator;
template<> class allocator<void> {
public:
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template <class U>
struct rebind { typedef allocator<U> other; };
};
% g++ -c toto.C
toto.C:9: invalid member template declaration
% g++ --version; uname -a
egcs-2.90.17 971114 (gcc2-970802 experimental)
SunOS piano 5.5 Generic_103093-14 sun4m sparc SUNW,SPARCstation-20
What am I missing about this diagnostic ? I recall this
fraction of code is that in CD2 regarding specialization for allocator.
-- gaby
Gabriel Dos Reis | École Normale Supérieure de Cachan
INRIA, Unité de Recherche de | Centre de Mathématiques et de Leurs
Sophia Antipolis | Applications
Projet SAFIR | Équipe de Géométrie