home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16745 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!ames!pasteur!ic.Berkeley.EDU!henryc
  3. From: henryc@ic.Berkeley.EDU (Henry Chang)
  4. Subject: Nested Templates in g++
  5. Message-ID: <1992Nov23.045517.10090@pasteur.Berkeley.EDU>
  6. Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
  7. Nntp-Posting-Host: ic.berkeley.edu
  8. Reply-To: henryc@ic.Berkeley.EDU (Henry Chang)
  9. Organization: University of California, at Berkeley
  10. Date: Mon, 23 Nov 1992 04:55:17 GMT
  11. Lines: 24
  12.  
  13. It is my understanding that nested templates in g++
  14. are not yet supported.  Does someone have a work-around?
  15.  
  16. What I wish to do is essentially...
  17. **********************************************************************
  18. template <class X, class Y> class A { };
  19. template <class X> class B { };
  20.  
  21. template <class X, class Y> class C {
  22.    B<A<X,Y>> a;
  23. };
  24.  
  25. main ()
  26. {
  27.    C<int,int> a;                // This causes the error to be produced
  28. }
  29. **********************************************************************
  30.  
  31. -Henry Chang
  32.  
  33. --
  34. Henry Chang                                        henryc@ic.Berkeley.EDU
  35. UC Berkeley Graduate Student                                 Berkeley, CA
  36.  
  37.