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

  1. Path: sparky!uunet!dtix!darwin.sura.net!tulane!uflorida!shades.cis.ufl.edu!jnw
  2. From: jnw@shades.cis.ufl.edu (Joseph N. Wilson)
  3. Newsgroups: comp.std.c++
  4. Subject: templatized typedef?
  5. Message-ID: <38010@uflorida.cis.ufl.edu>
  6. Date: 22 Dec 92 20:45:07 GMT
  7. Sender: news@uflorida.cis.ufl.edu
  8. Reply-To: jnw@shades.cis.ufl.edu (Joseph N. Wilson)
  9. Organization: University of Florida CIS dept.
  10. Lines: 29
  11. Nntp-Posting-Host: shades.cis.ufl.edu
  12.  
  13. Please forgive me if this is old ground for this group.
  14.  
  15. CFront 3.0.1 does not let me do the following:
  16.  
  17.     template <class T>
  18.     class C{ ... };
  19.  
  20.     template <class S>
  21.     typedef C<S>  D;
  22.  
  23.  
  24. The reason I'd like to do this is to be able to rename (using typedef)
  25. a number of classes.  I thought this would be a clean way to rename
  26. the template classes if it were supported.  I had a suspicion it might not
  27. be supported right from the start.
  28.  
  29. Anyway, here's my question:
  30.  
  31. Is what I'm trying to do above _standard_ C++, or is it a fringe interpretation.
  32. I figured because my typedef is a decl-specifier introducing a class-name,
  33. that it should be a valid class declaration, thus the ARM should be satisfied
  34. on page 342.  Is my reasoning faulty?  What do you gurus say?
  35.  
  36. Joe Wilson
  37. (jnw@cis.ufl.edu)
  38.  
  39. P.S. CFront complains saying "D: only static data class members may be
  40. parameterized."  I have difficulty interpreting this message in the context
  41. above.
  42.