This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[egcs-971114] invalid member template declaration ?



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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]