public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [egcs-971114] invalid member template declaration ?
@ 1997-11-30  8:38 Gabriel Dos Reis
  1997-11-30 12:42 ` Mark Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Dos Reis @ 1997-11-30  8:38 UTC (permalink / raw)
  To: egcs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [egcs-971114] invalid member template declaration ?
  1997-11-30  8:38 [egcs-971114] invalid member template declaration ? Gabriel Dos Reis
@ 1997-11-30 12:42 ` Mark Mitchell
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 1997-11-30 12:42 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: egcs

Gabriel --

  Member template *classes* (as opposed to functions) aren't supported
yet.  The error message is admittedly ungraceful.

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-30 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-30  8:38 [egcs-971114] invalid member template declaration ? Gabriel Dos Reis
1997-11-30 12:42 ` Mark Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).