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

[basic.life] "Otherwise, such a pointer/glvalue refers to allocated storage" is unclear CWG2551 #4153

Closed
languagelawyer opened this issue Sep 7, 2020 · 2 comments
Labels
cwg Issue must be reviewed by CWG.

Comments

@languagelawyer
Copy link
Contributor

[basic.life]/6:
"""
Before the lifetime of an object has started but after the storage which the object will occupy has been allocated29 or, after the lifetime of an object has ended and before the storage which the object occupied is reused or released, any pointer that represents the address of the storage location where the object will be or was located may be used but only in limited ways.
For an object under construction or destruction, see [class.cdtor].
Otherwise, such a pointer refers to allocated storage ([basic.stc.dynamic.allocation]) ...
"""

[basic.life]/7:
"""
Similarly, before the lifetime of an object has started but after the storage which the object will occupy has been allocated or, after the lifetime of an object has ended and before the storage which the object occupied is reused or released, any glvalue that refers to the original object may be used but only in limited ways.
For an object under construction or destruction, see [class.cdtor].
Otherwise, such a glvalue refers to allocated storage ([basic.stc.dynamic.allocation]) ...
"""
The meaning of [the beginning of] the last-cited sentences is unclear, especially from the pointer values taxonomy POV.

@jensmaurer
Copy link
Member

I'm unsure what part of this could be addressed editorially.

@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. decision-required A decision of the editorial group (or the Project Editor) is required. labels Sep 8, 2020
@jensmaurer
Copy link
Member

Created CWG2551

@jensmaurer jensmaurer changed the title [basic.life] "Otherwise, such a pointer/glvalue refers to allocated storage" is unclear [basic.life] "Otherwise, such a pointer/glvalue refers to allocated storage" is unclear CWG2551 Mar 16, 2022
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

No branches or pull requests

2 participants