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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
  3. From: cflatter@nrao.edu (Chris Flatters)
  4. Subject: Re: template disappointments ... (suggestions?
  5. Message-ID: <1992Dec29.204431.13413@nrao.edu>
  6. Sender: news@nrao.edu
  7. Reply-To: cflatter@nrao.edu
  8. Organization: NRAO
  9. References: <DSCHIEB.92Dec29133556@muse.cv.nrao.edu>
  10. Date: Tue, 29 Dec 1992 20:44:31 GMT
  11. Lines: 25
  12.  
  13. In article 92Dec29133556@muse.cv.nrao.edu, dschieb@muse.cv.nrao.edu (Darrell Schiebel) writes:
  14. >    (1) The inability to derive templated classes from a non-templated 
  15. >        base class of the same name:
  16. >        class typeinfo {};
  17. >        template<class t> class typeinfo : public typeinfo {};
  18.  
  19. This is according to the ARM:
  20.  
  21.     A class template name must be unique in the program and may not
  22.     be declared to refer to any other template, class, function,
  23.     object, value, or type in the same scope.
  24.                             [p343]
  25. >
  26. >    (2) but worse than this minor item, it seems as though it is 
  27. >        impossible to compose templates from templates:
  28. >        template<class t> class vector {};
  29. >        template<class t> class list {};
  30. >
  31. >        list<vector<int>> list_vec_int;
  32.  
  33. Put a space between the two closing angle brackets: ">>" lexes as the right-shift
  34. operator; "> >" lexes as two consecutive closing angle brackets.
  35.  
  36.     Chris Flatters
  37.     cflatter@nrao.edu
  38.