Topic: template (partial) specialization question
Author: martin@osm-gmbh.de
Date: 1999/01/14 Raw View
Is there a method to use the members of a primary template in a
specialization?
template <class T> class base {
public:
std::vector< base<T> > &f();
void g();
};
class X;
class base<X> {
// using base
void g();
};
I want to override(*) a few members/[cd]tors. All other members should be
taken from base<>. A derived class isn't a good solution, because of the
return-type of f().
*: I don't know if it is "override", "overload" or what else.
--
Martin Nicolay, OSM GmbH, Germany
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Jaakko =?ISO-8859-1?Q?J=E4rvi" ?= <jaakko.jarvi@cs.utu.fi>
Date: 1999/01/15 Raw View
martin@osm-gmbh.de wrote in message <77l2ba$3q3$1@nnrp1.dejanews.com>...
>Is there a method to use the members of a primary template in a
>specialization?
No. A specialisation is totally independent of the primary template and does
not 'know' anything about the members of the primary template.
Jaakko J rvi
--- Turku Centre for Computer Science, Finland ---
--- E-mail: Jaakko.Jarvi@cs.utu.fi ---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]