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

The name is bound to a declaration vs is bound to a Scope #4838

Open
xmh0511 opened this issue Aug 25, 2021 · 0 comments
Open

The name is bound to a declaration vs is bound to a Scope #4838

xmh0511 opened this issue Aug 25, 2021 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Aug 25, 2021

For a single search([basic.lookup.general] p3), we require the name is bound in a scope. Rather, in [basic.scope.scope] p4, we say the name is bound to a declaration. It means, as a normal case, a name introduced by a declaration is bound to it and is also bound to its target scope. However, the meaning couldn't be phrased in the common rule [basic.scope.scope] p2

Unless otherwise specified:

  • [...]
  • Any names (re)introduced by a declaration are bound to it in its target scope.

In my mind, the rule only says the name is bound to the declaration but didn't phrase that the name is also bound to the target scope. Could we decompose the rule into two common bullets?

Unless otherwise specified:

  • [...]
  • Any names (re)introduced by a declaration are bound to it
  • Any names first introduced by a declaration are bound to its target scope
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

1 participant