The comment in the code snippet suggests that calling spam without qualifying it as ABC::spam would result in a compilation error, which is not accurate in this context. The C++ compiler's name lookup rules allow this call to resolve correctly to ABC::spam from within ABC::DEF::uses_spam.
https://github.com/cmu-db/15445-bootcamp/blob/main/src/namespaces.cpp#L48-L62
The comment in the code snippet suggests that calling spam without qualifying it as ABC::spam would result in a compilation error, which is not accurate in this context. The C++ compiler's name lookup rules allow this call to resolve correctly to ABC::spam from within ABC::DEF::uses_spam.
https://en.cppreference.com/w/cpp/language/unqualified_lookup