I came across the below piece of code in a header file.
template <int x, template <typename T> class Car,
typename DOC, typename COMMON,
typename filter = imp::Filter>
class CurrentClass
: public imp::base<
x, Car, DOC,
CurrentClass<x, Car, DOC, COMMON>, Filter> {
public:
COMMON *common;
CurrentClass(Connection &cnt, COMMON *common_)
: imp::base<
x, Car, DOC,
CurrentClass<x, Car, DOC, COMMON>,
Filter>(cnt),
common(common_) {}
};
Can someone please explain the different parts of this code in terms of templates and class inheritance?
According to my understanding CurrentClass
inherits from the base class declared in imp class.
Thanks