Template specialization doesn't see a function in its point of instantiation
问题 I don't understand why it isn't correct #include <iostream> using namespace std; struct CL{}; template <typename T> void fnc(T t) { f(t); } namespace NS { void f(CL){} void fn() {fnc(CL()); /*error is here*/} //point of instantiation fnc<CL> is here (in namespace scope, //according to 14.6.4.1/1) } int main(){} Calling f(t) in template function fnc is dependent on template parameter and then name lookup must be at an instantiation point. I saw Standard (C++ 14) 14.6.4.1/1 For a function