-
Notifications
You must be signed in to change notification settings - Fork 7
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
[basic.def.odr] p15 Whether the specified behavior is prior to the analysis of the requirements #271
Comments
The wording here is changed by CWG2300. We may need to carefully make clarification to avoid regression. |
I didn't suggest to revert the old wording. We agree that we should clarify the issues mentioned above based on the current wording. |
I think the example in p16 makes it clear how to read the rules. In this case, the "same entity" question relates to the closure type, as opposed to a local variable, but it's the same question. Put differently, p14.5 and p15 interact to make sure we get the "single entity" interpretation recursively, where needed. Given the example and absent any demonstrated implementation divergence and absent a specific suggestion how to improve the wording, I don't think I'll spend CWG bandwidth on this. |
These preconditions that we assume to be true should be placed prior to the requirements we specified in the list. That is, we should separate p15 into two parts.
Then, in p15, we say
|
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[basic.def.odr] p14 says
[basic.def.odr] p15 says
The issue is, whether the name
a
refers to the same entity or not. [basic.link] cannot apply to this case becausea
does not have a linkage. Unlike C++17 standardSo, the issue is, which opinion is the intent
Anyway, we cannot check whether the
a
in the two definitions refer to the same entity or not if the intent is the opinion 2. However, the order of the rules and the wording does lead us to read out opinion 2.If the intent is opinion 1, that means, the requirement always be satisfied by
D
because it is assumed to have a single definition. This will not make sense. So, both opinions have their issues for the entity defined inD
andD
.The text was updated successfully, but these errors were encountered: