Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mistake in namespaces.cpp #22

Open
whxhlgy opened this issue Aug 22, 2024 · 2 comments
Open

mistake in namespaces.cpp #22

whxhlgy opened this issue Aug 22, 2024 · 2 comments

Comments

@whxhlgy
Copy link

whxhlgy commented Aug 22, 2024

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
Copy link
Member

apavlo commented Aug 22, 2024

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

@raunaqpahwa
Copy link

@apavlo #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants