home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky gnu.g++.help:1598 comp.lang.c++:18062
- Path: sparky!uunet!mcsun!sunic!dkuug!diku!halgrim
- From: halgrim@diku.dk (Maz H. Spork)
- Newsgroups: uw.dcs.general,gnu.g++.help,comp.lang.c++
- Subject: Re: Deriving C++ Templates
- Message-ID: <1992Dec16.150157.10365@odin.diku.dk>
- Date: 16 Dec 92 15:01:57 GMT
- References: <1992Dec15.160544.26065@dcs.warwick.ac.uk>
- Sender: halgrim@freja.diku.dk
- Organization: Department of Computer Science, U of Copenhagen
- Lines: 16
-
- You'll have to explicitly state in the derived class which type of the
- base class you want to use, ie:
-
- template <class C>
- class Base<T> { };
-
- template <class C>
- class Derived<C> : Base <C> { };
-
- or similar, or simpler, like fewer template dependencies.
-
- By the way, for good programming practice, consider deriving Matrix from
- Vector rather than the other way round...
-
-
- Maz
-