Article View: uw.dcs.general
Article #7Re: Deriving C++ Templates
From: Maz H. Spork
Date: Wed, 16 Dec 1992 15:01
Date: Wed, 16 Dec 1992 15:01
16 lines
835 bytes
835 bytes
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
Technical Details
Message-ID:
<1992Dec16.150157.10365@odin.diku.dk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!diku!halgrimReferences:
<1992Dec15.160544.26065@dcs.warwick.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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