home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@uunet.uu.net!mole-end
- Subject: Re: template argument as base class
- Message-ID: <1992Jul26.025942.6471@uunet.uu.net!mole-end>
- Organization: :
- References: <20204@sbsvax.cs.uni-sb.de> <1992Jul24.195032.14884@delfin.com>
- Date: Sun, 26 Jul 1992 02:59:42 GMT
- Lines: 23
-
- In article <1992Jul24.195032.14884@delfin.com>, kinne@delfin.com (Kinne Strong) writes:
- > stefan@mpi-sb.mpg.de (Stefan Naeher) writes:
-
- > : template <class T> class XYZ : public T { };
- > : cfront says
- > : "sorry, not implemented: formal type parameter T used as base class of
- > : template"
-
- > : A possible application is the implementation of data types with
- > : implementation parameters, e.g., dictionary<skiplist>,
- > : dictionary<red_black_tree>, ....
-
- > It sounds to me like what you really want is inheritance and virtual
- > functions. ...
-
- Inheritance can allow the smarts of the implementation to be shared, but
- genericity (parameterization, in C++: templates) is necessary to put a
- typesafe wrapper around it.
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- uunet!mole-end!mat, Somewhere in Matawan, NJ
-