This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

variable argument list inheritance (fwd)


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 ?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]