[egcs-971114] invalid member template declaration ?

Gabriel Dos Reis Gabriel.Dos-Reis@dptmaths.ens-cachan.fr
Sun Nov 30 08:38:00 GMT 1997


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 



More information about the Gcc mailing list