The minimal change required is to insert some expression in the specialization that is dependent on T::special
and yields void
(to match the default argument). For example:
template<class T>
struct void_alias
{
typedef void type;
};
template <typename T>
struct DetectSpecial<T, typename void_alias<typename T::special>::type> {
void detected() { std::cout << "Special!\n"; }
};