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

[dcl.meaning.general] Clarify correspondence for block-scope friends #5149

Merged
merged 1 commit into from Jan 14, 2022

Conversation

jensmaurer
Copy link
Member

Fixes #5148

@jensmaurer
Copy link
Member Author

@opensdh, see the linked issue. This fix seems obvious and desirable. Please have a look.

Copy link
Contributor

@opensdh opensdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is obviously what was meant; I fell into the trap of imagining the check as happening immediately upon encountering the declaration.

@@ -2548,7 +2548,7 @@
Otherwise, the terminal name of $E$ is not looked up.
The declaration's target scope is the innermost enclosing namespace scope;
if the declaration is contained by a block scope,
the declaration shall correspond to a declaration
the declaration shall correspond to a reachable\iref{module.reach} declaration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just use English "an earlier", since we can't need to look into other translation units as for "precedes" or "reachable".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, but "earlier" also has a temporal meaning, which we don't want here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no time to apply here (although my initial mistake was more or less supposing that there was).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, and that's why I don't want "earlier", which has a temporal aspect. In contrast, "reachable" has positional meaning (only), not temporal.

@jensmaurer
Copy link
Member Author

@tkoeppe , this looks ready.

@tkoeppe tkoeppe merged commit 26ce304 into cplusplus:main Jan 14, 2022
@jensmaurer jensmaurer deleted the c65 branch January 14, 2022 17:58
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

Successfully merging this pull request may close these issues.

[dcl.meaning.general] p2.3 Correspond to a declaration that inhabits the block scope is not sufficient
3 participants