Is substitution failure an error with dependent non-type template parameters?
问题 Let's say I have these template aliases: enum class enabler {}; template <typename T> using EnableIf = typename std::enable_if<T::value, enabler>::type; template <typename T> using DisableIf = typename std::enable_if<!T::value, enabler>::type; I can do the following in GCC: #include <iostream> template <typename T, EnableIf<std::is_polymorphic<T>> = {}> void f(T) { std::cout << "is polymorphic\n"; } template <typename T, DisableIf<std::is_polymorphic<T>> = {}> void f(T) { std::cout << "is not