So, let's say I have a class with many template arguments, one of them is a derived class for using CRTP:
template <typename Derived, typename A, typename B, typename C, typename D>
class BaseFoo {
public:
BaseFoo(A& a) {}
};
And I want to inherit it:
class DerivedFoo : public BaseFoo<DerivedFoo, Bc, Cc, Dc, Ec> {
public:
DerivedFoo(A& a) : BaseFoo<DerivedFoo, Bc, Cc, Dc, Ec>(a) {}
};
Is there any trick to avoid mentioning an explicit template argument?
This is normal if I still need to specify Derivedas template arguments.
source
share