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:
Code:
template<typename T> struct W {...};
I can specialise W in many different ways. Some examples follow:
Code:
template<> struct W<int> {...};
template<typename T> struct W<T*> {...};
template<typename T> struct W<const T* const &> {...};
...
I assume it is possible to specialise W (even partially) for any type, may it be defined by myself or not.
Nevertheless, I am not being able to specialse it for inner classes of template structures. For instance, suppose I define:
Code:
template<typename T> struct X {
...
struct Y {...};
};
How do I get to specialise W for Y? I tried writting
Code:
template<typename T> struct W<typename X<T>::Y> {...};
without much success.
Can someone help me with this?
Thanks in advance.