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

Why do these two overloads collide, and what is the standard fix?

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);