cmu-db / 15445-bootcamp

A basic introduction to coding in modern C++.
Apache License 2.0
674 stars 128 forks source link

mistake in namespaces.cpp #22

Open whxhlgy opened 3 weeks ago

whxhlgy commented 3 weeks ago

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

apavlo commented 3 weeks ago

@whxhlgy Thanks! Can you send a PR with the fix?

raunaqpahwa commented 1 week ago

@apavlo https://github.com/cmu-db/15445-bootcamp/pull/23