views:

28

answers:

1

Hi there,

is there some way to use a boost tuple's ctors as an addition to the subclass methods (and ctors) like here?

// typedef boost::tuple<int, SomeId, SomeStatus> Conn;
// Conn(1); // works and initializes using default ctors of Some*
struct Conn : boost::tuple<int, AsynchId, AccDevRetStatus> {};
Conn(1); // "no matching function call" (but i want it so much)

T.H.X.

+2  A: 

You have to define all constructors yourself and forward to the base class.

Note that you can create a typedef instead.

typedef boost::tuple<int, AsynchId, AccDevRetStatus> Conn;
avakar