This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
variable argument list inheritance (fwd)
- To: libstdc++ at gcc dot gnu dot org
- Subject: variable argument list inheritance (fwd)
- From: flatmax <flatmax at cse dot unsw dot EDU dot AU>
- Date: Wed, 21 Feb 2001 12:08:14 +1100 (EST)
Hi there ...
Is it possible to have inherited constructors with variable argument lists
'...' ? For example :
class a{
public: a(...){}
};
class b : public a {
public: b(...) : a(...) {}
};
the actual code looks like so :
I get the following error :
masterCounterInterface.H: In method
`MasterCounterInterface<CARRYTYPE,COUNTERTYPE,FIELDTYPE,FIELDCOUNT>::MasterCounterInterface(COUNTERTYPE,
COUNTERTYPE, ...)':
masterCounterInterface.H:15: parse error before `...'
masterCounterInterface.H:15: parse error at end of saved function text
it is due to the following code :
template <class CARRYTYPE, class COUNTERTYPE, class FIELDTYPE, int
FIELDCOUNT>
class MasterCounterInterface : public MasterCounter<CARRYTYPE,
COUNTERTYPE, FIELDTYPE, FIELDCOUNT> {
public:
MasterCounterInterface(COUNTERTYPE startVal, COUNTERTYPE maximumVal,
...) : MasterCounter<CARRYTYPE, COUNTERTYPE, FIELDTYPE,
FIELDCOUNT>(startVal, maximumVal, ...){
}
};
can anyone help ?