Skip to content

mistake in namespaces.cpp #22

Open
@junjiexh

Description

@junjiexh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions