Given the following class:
template<typename BoringArg1 = int,
typename BoringArg2 = char,
typename ThisDefinitionIsSoLong = int,
typename WhoWroteThis = double>
class A {
// ...
};
Now I want to inherit from A, keeping it templated:
template<typename BoringArg1 = int,
typename BoringArg2 = char,
typename ThisDefinitionIsSoLong = int,
typename WhoWroteThis = double>
class B : public A<BoringArg1, BoringArg2, ThisDefinitionIsSoLong, WhoWroteThis> {
// ...
};
As you can see, the templated arguments are repeated. Is it possible to avoid this ? Moreover, the default arguments of A may change. It would be nice to reflect these change in B without code modification in B. One solution I see is to make a bunch of template type DefaultTypeXXX. It's a bit tedious, and can't really change the order and count of template arguments of A (but this condition is lesser important). Is there any alternative ?