template-specialization

Problem with template specialization and template template parameters

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 Ex...

Out of class constructor definition for a specialized class template

I am trying to define a constructor for an explicitly specialized class template outside the class definition, as so: template <typename T> struct x; template <> struct x<int> { inline x(); /* This would have compiled: x() { } */ }; template <> // Error x<int>::x() { } But it seems to be an error. Comeau says...