home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18548 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.8 KB  |  44 lines

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