D
Dilip
How did the Koenig lookup come to be associated with templates?
If I have something like this: (no template code)
namespace X
{
enum E { e1 };
void f(E) { }
}
void f(int)
{
}
int main()
{
f(X::e1);
return 0;
}
does the call in main invoke X::f() or ::f()?
In the text I am reading it says the former is preferred but how does
Koening Lookup assume precedence over ordinary lookup?
If I have something like this: (no template code)
namespace X
{
enum E { e1 };
void f(E) { }
}
void f(int)
{
}
int main()
{
f(X::e1);
return 0;
}
does the call in main invoke X::f() or ::f()?
In the text I am reading it says the former is preferred but how does
Koening Lookup assume precedence over ordinary lookup?