I have a class Helper
:
template <typename T, template <typename> E>
class Helper {
...
};
I have another class template, Exposure
, which is to inherit from Helper
while passing itself as the template template parameter E
. I also need to specialize Exposure
. Thus I want to write something like the following:
template <>
class Exposure<int> : public Helper<int, Exposure> {
Exposure() : Helper<int, Exposure>() {
...
};
...
};
Unfortunately this won't compile. gcc complains:
Exposure.h:170: error: type/value mismatch at argument 2 in template parameter list for `‘template > class ExposureHelper’
Exposure.h:170: error: expected a constant of type ‘’, got ‘Exposure’
Am I doing something wrong? Is there a workaround for what I'm trying to do?