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.life]/6 and [basic.life]/7 Duplicate wording regarding access outside of lifetime #5763
Comments
I think this deserves a CWG issue. And [basic.life]/(6.4) is problematic to me: it seemly prohibits |
Why is this issue not editorial? There are more than one issues with this paragraph, see also https://stackoverflow.com/q/73434558. However, I think it should be a issue with
|
As you have shown, there is deviating wording between p6 and p7, and it's not at all obvious whether that is intended to be the same or not. Plus, a wording change of that scale is best reviewed by CWG instead of doing that editorially. |
CWG1530 is mildly related. |
I'm seeing how p6.2 is redundant with p7.1 and p7.2 (because a pointer gets dereferenced to an lvalue in [expr.ref]). It is unclear what "access the object" means; see CWG1530. Once we remove p6.2, the repetition is cut down; the reference and pointer Would the removal of p6.2 be sufficiently helpful here to warrant a separate core issue; leaving the larger topic of CWG1530 for another time? |
The wording for [basic.life]/6 and [basic.life]/7 is basically the same, except:
is not the same as
[basic.life]/6 lacks a description of using pointers to access the object, but the lvalue result of pointer dereferencing still applies to [basic.life]/7.1. [basic.life]/7 lacks a description of accessing a non-static data member of the object, but accessing a non-static data member of the object is accessing the object.
And wording that applies only to pointers in [basic.life]/6:
This creates unnecessary repetition and can be confusing. So, wording similar to cppreference#Access outside of lifetime can be used.
The text was updated successfully, but these errors were encountered: