In accordance with the C ++ standard: -
Name search rules apply evenly to all names (including typedef-names (7.1.3), namespace-names (7.3), concept names (14.9), concept map names (14.9.2), and the -names class (9.1)), where the grammar allows such names in the context discussed by a particular rule.
Do name lookup rules apply until overload resolution?
There must be some reason why I do not understand.
The following example is from a C ++ book in a nutshell: -
void func(int i)
{
std::cout << "int: " << i << '\n';
}
namespace N
{
void func(double d)
{
std::cout << "double: " << std::showpoint << d << '\n';
}
void call_func( )
{
func(3);
}
}
source
share