home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!ames!pasteur!ic.Berkeley.EDU!henryc
- From: henryc@ic.Berkeley.EDU (Henry Chang)
- Subject: Nested Templates in g++
- Message-ID: <1992Nov23.045517.10090@pasteur.Berkeley.EDU>
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Nntp-Posting-Host: ic.berkeley.edu
- Reply-To: henryc@ic.Berkeley.EDU (Henry Chang)
- Organization: University of California, at Berkeley
- Date: Mon, 23 Nov 1992 04:55:17 GMT
- Lines: 24
-
- It is my understanding that nested templates in g++
- are not yet supported. Does someone have a work-around?
-
- What I wish to do is essentially...
- **********************************************************************
- template <class X, class Y> class A { };
- template <class X> class B { };
-
- template <class X, class Y> class C {
- B<A<X,Y>> a;
- };
-
- main ()
- {
- C<int,int> a; // This causes the error to be produced
- }
- **********************************************************************
-
- -Henry Chang
-
- --
- Henry Chang henryc@ic.Berkeley.EDU
- UC Berkeley Graduate Student Berkeley, CA
-
-