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: error: "x<int>::x()" is not an entity that can be explicitly specialized
, even though the complete class is what being specialized.
What's the issue here?