Could someone please explain why the following code is giving error (error C2065: 'select' : undeclared identifier
) at compile time:
namespace N {
class MyClass{
};
template<int I> void select(MyClass*)
{}
}
void g (N::MyClass* mp)
{
select<10>(mp);
}
void main()
{}
According to Argument Dependent Lookup, this should work fine, since I have specified N::
in `g``s argument. So, select should be visible to compiler.
Why does ADL not work here?