home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.g++.help
- Path: sparky!uunet!spool.mu.edu!agate!pasteur!ic.Berkeley.EDU!henryc
- From: henryc@ic.Berkeley.EDU (Henry Chang)
- Subject: Nested Templates
- Message-ID: <1992Nov23.005355.3488@pasteur.Berkeley.EDU>
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Nntp-Posting-Host: ic.berkeley.edu
- Organization: EECS CAD Group, UC Berkeley
- Date: Mon, 23 Nov 1992 00:53:55 GMT
- Lines: 23
-
- It is my understanding that nested templates 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
-