consider the following code:
struct X
{
template <typename T>
class Y
{};
};
template<>
class X::Y<double>{
};
here we specialize in class Y for type double and the code works fine. The problem is that if I change the code to this:
template<typename A>
struct X
{
template <typename T>
class Y
{};
};
template<typename A>
class X<A>::Y<double>{
};
the compiler will report an error:
'X :: Y': explicit specialization uses partial specialization syntax, use the template <> instead!
Does anyone know how I can specialize class Y in this case?
source
share