While testing SFINAE, I found something that I don't think should work
问题 I found an interesting conditional function exclusion that I got from this site and while testing it I came across this: #include<type_traits> namespace detail { enum enabler {}; } template <int overload, typename Condition> using EnableIf = std::enable_if_t<Condition::value, detail::enabler>; template <typename T, EnableIf<0, std::is_same<T, int>>...> T twice(T t) { return 2 * t; } template <typename T, EnableIf<0, std::is_same<T, float>>...> T twice(T t) { return 2 * t; } int main() { twice