Andrew Koenig devised an algorithm for resolving namespace members’ lookup. This algorithm is used in all standard-conforming compilers to handle cases like the following:
namespace MINE { class C {}; void func(C); } MINE::C c; // global object of type MINE::Cvoid main() { func( c ); // OK, MINE::f called }
No using declaration or using directive exists in the program. Still, the compiler did the right thing by applying Koenig lookup. Koenig lookup instructs the compiler to look not just in the usual places such as the local scope, but also the namespace that contains the argument’s type.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.






















