home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!usc!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
- From: cflatter@nrao.edu (Chris Flatters)
- Subject: Re: template disappointments ... (suggestions?
- Message-ID: <1992Dec29.204431.13413@nrao.edu>
- Sender: news@nrao.edu
- Reply-To: cflatter@nrao.edu
- Organization: NRAO
- References: <DSCHIEB.92Dec29133556@muse.cv.nrao.edu>
- Date: Tue, 29 Dec 1992 20:44:31 GMT
- Lines: 25
-
- In article 92Dec29133556@muse.cv.nrao.edu, dschieb@muse.cv.nrao.edu (Darrell Schiebel) writes:
- > (1) The inability to derive templated classes from a non-templated
- > base class of the same name:
- > class typeinfo {};
- > template<class t> class typeinfo : public typeinfo {};
-
- 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]
- >
- > (2) but worse than this minor item, it seems as though it is
- > impossible to compose templates from templates:
- > template<class t> class vector {};
- > template<class t> class list {};
- >
- > list<vector<int>> list_vec_int;
-
- Put a space between the two closing angle brackets: ">>" lexes as the right-shift
- operator; "> >" lexes as two consecutive closing angle brackets.
-
- Chris Flatters
- cflatter@nrao.edu
-