home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!stanford.edu!EE.Stanford.EDU!sierra!mcgrant
- From: mcgrant@rascals.stanford.edu (Michael C. Grant)
- Subject: Re: template disappointments ... (suggesti
- In-Reply-To: cflatter@nrao.edu's message of Wed, 30 Dec 1992 16:51:54 GMT
- Message-ID: <MCGRANT.92Dec30102914@rascals.stanford.edu>
- Sender: usenet@EE.Stanford.EDU (Usenet)
- Organization: Information Systems Laboratory, Stanford University
- References: <MCGRANT.92Dec29191250@gomez.stanford.edu> <1992Dec30.165154.25081@nrao.edu>
- Date: 30 Dec 92 10:29:14
- Lines: 31
-
- In article <1992Dec30.165154.25081@nrao.edu>
- cflatter@nrao.edu (Chris Flatters) writes:
-
- The declaration of a class introduces a new keyword into the language. After
- encountering the declaration "class typeinfo { ... };" the lexical analyser will
- recognize "typeinfo" as a class name. This means that "template<class T>
- class typeinfo: public typeinfo {};" looks like:
-
- I see the difficulty.
-
- >
- > This is according to the ARM:
- >
- > A class template name must be unique in the program and may not
- > be declared to refer to any other template, class, function,
- > object, value, or type in the same scope.
- > [p343]
- >What's yer point? That's why this is called 'template disappointments.'
-
- The point is that cfront will reject "template <class T> class foo: public foo {}"
- because it is forbidden by the language definition and not because of a compiler
- deficiency.
-
- Again, I ask 'what's yer point?' We're describing things that we know darn
- well aren't permitted for one reason or another, BOTH because it is
- forbidden and because the compiler is deficient.
-
- Mike
-
- --
- "Long hair, short hair--what's the difference once the head's blowed off?" (?)
-