Function template specialization vs overload
Given:
#include <iostream>
template<typename T> void f(T) { std::cout << "T"; }
template<> void f(int) { std::cout << "int"; }
void f(int) { std::cout << "func"; }
What is printed by f(42)?
Sign in to answer questions and track your progress
Sign In