Argument-Dependent Lookup (ADL)
ADL defines rules lookup for an unqualified function names.
Example Use Case
namespace nsp
{
class TestClass
{
};
void PrintTestClass(const TestClass&)
{
}
}
int main()
{
nsp::TestClass a;
// Qualifying PrintTestClass with namespace is not needed
// e.g. nsp::PrintTestClass(a);
PrintTestClass(a);
return 0;
}
Special Use Cases
C++ Core Guidelines: Surprises with Argument-Dependent Lookup mentions interesting cases with ADL.