Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++SFINAE and enable_ifSingle-choice MCQ

Why does this default-template-argument SFINAE pattern fail to distinguish the two overloads?

template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> void g(T) {} template <typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>> void g(T) {}