Overload Resolution in a Namespace
问题 I am attempting to call an overloaded function inside a namespace and am struggling a bit. Working Example 1: No namespace class C {}; inline void overloaded(int) {} template<typename T> void try_it(T value) { overloaded(value); } inline void overloaded(C) {} int main() { try_it(1); C c; try_it(c); return 0; } Working Example 2: All overloads defined before template class C {}; namespace n { inline void overloaded(int) {} inline void overloaded(C) {} } template<typename T> void try_it(T value