home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / help / 1468 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.0 KB  |  35 lines

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