I am currently having an issue with C++ metaprogramming system. To be more specific, the issue is about partial template specialisation.
Suppose I define a template as below:
I can specialise W in many different ways. Some examples follow:Code:template<typename T> struct W {...};
I assume it is possible to specialise W (even partially) for any type, may it be defined by myself or not.Code:template<> struct W<int> {...};
template<typename T> struct W<T*> {...};
template<typename T> struct W<const T* const &> {...};
...
Nevertheless, I am not being able to specialse it for inner classes of template structures. For instance, suppose I define:
How do I get to specialise W for Y? I tried writtingCode:template<typename T> struct X {
...
struct Y {...};
};
without much success.Code:template<typename T> struct W<typename X<T>::Y> {...};
Can someone help me with this?
Thanks in advance.