home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!tulane!uflorida!shades.cis.ufl.edu!jnw
- From: jnw@shades.cis.ufl.edu (Joseph N. Wilson)
- Newsgroups: comp.std.c++
- Subject: templatized typedef?
- Message-ID: <38010@uflorida.cis.ufl.edu>
- Date: 22 Dec 92 20:45:07 GMT
- Sender: news@uflorida.cis.ufl.edu
- Reply-To: jnw@shades.cis.ufl.edu (Joseph N. Wilson)
- Organization: University of Florida CIS dept.
- Lines: 29
- Nntp-Posting-Host: shades.cis.ufl.edu
-
- Please forgive me if this is old ground for this group.
-
- CFront 3.0.1 does not let me do the following:
-
- template <class T>
- class C{ ... };
-
- template <class S>
- typedef C<S> D;
-
-
- The reason I'd like to do this is to be able to rename (using typedef)
- a number of classes. I thought this would be a clean way to rename
- the template classes if it were supported. I had a suspicion it might not
- be supported right from the start.
-
- Anyway, here's my question:
-
- Is what I'm trying to do above _standard_ C++, or is it a fringe interpretation.
- I figured because my typedef is a decl-specifier introducing a class-name,
- that it should be a valid class declaration, thus the ARM should be satisfied
- on page 342. Is my reasoning faulty? What do you gurus say?
-
- Joe Wilson
- (jnw@cis.ufl.edu)
-
- P.S. CFront complains saying "D: only static data class members may be
- parameterized." I have difficulty interpreting this message in the context
- above.
-