home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!gmd.de!Germany.EU.net!mcsun!news.funet.fi!aton.abo.fi!aton.abo.fi!rosenber
- From: rosenber@aton.abo.fi (Robin Rosenberg INF)
- Subject: templates within templates
- Message-ID: <ROSENBER.92Nov11235158@aton.abo.fi>
- Sender: usenet@abo.fi (Usenet NEWS)
- Organization: Abo Akademi University, Finland
- Distribution: comp
- Date: Wed, 11 Nov 1992 21:51:58 GMT
- Lines: 22
-
-
- I tried using templates like this:
-
- Ref<Node<T>> obj;
-
- I tried Borland C++ (3.0) and g++ (2.1) and neither accepts the
- syntax. If I change this to
-
- typedef Node<T> Node_T;
- Ref<Node_T> obj;
-
- then it is accepted.
-
- So the questions are:
- Is it legal to use a template as class argument for a template?
- If yes; which compilers accept it ?
- Any ideas of how to avoid the problem besides using typedefs?
-
- ----
- Robin Rosenberg
-
-
-