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

What is the result of compiling and running this program?

#include <type_traits> #include <iostream> template <class T, std::enable_if_t<std::is_integral_v<T>, int> = 0> void f(T) { std::cout << "integral"; } template <class T, std::enable_if_t<std::is_pointer_v<T>, int> = 0> void f(T) { std::cout << "pointer"; } int main() { int x = 0; f(&x); }