Some of my base classes get tons of parameters. Now I want to specify which static function to use:
template <typename... Types>
struct SBase {
static void func() {
}
};
struct A : public SBase<int> {
};
struct B : public A, public SBase<int, double, short,
unsigned int, float, unsigned char, long, unsigned long> {
// using SBase::func; // Not possible.
// Horrible, but works.
using SBase<int, double, short,
unsigned int, float, unsigned char, long, unsigned long>::func;
};
Aso you can see, I need to write the template parameters twice which leads to code duplication.
Is there any way to get rid of it?