I am trying to find way to design a class template so that an int
value is passed, and several function signatures as well as argument lists are dependent on this value.
Particularly, considering MyClass
:
template <int N>
class MyClass {
typedef SomeType<int, int, int, /* ... N times*/ > MyDepType;
myFunction(std::string arg0, std::string arg1, /* ...*/ std::string argN) { /* do stuff */};
public:
MyClass() {
someFunction(float arg0, float arg1, /* ...*/ float argN); // <
someOtherFunction(boost::bind(&MyClass::myFunction, this, _1, _2, /*...*/ _N));
};
};
I'd like to be able to express both the private typedef call, the signature of myFunction
and the argument list passed to external functions someFunction
and someOtherFunction
, which I can't edit/rewrite.
Is there a way to achieve this, using the C++11 standard?