consider the following code :
struct X
{
template <typename T>
class Y
{};
};
template<>
class X::Y<double>{
};
here we are specializing the Y class for the 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 is using partial specialization syntax, use template <> instead!
dose any one know how can I specialize class Y in this case?