Skip to content

[allocator.requirements.general] Change "pointer" to "value". #7442

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

Closed
wants to merge 1 commit into from

Conversation

FrankHB
Copy link
Contributor

@FrankHB FrankHB commented Nov 26, 2024

Technically a pointer is a type, this should mean "a pointer value". And "a pointer value of type C*" is somewhat confusing between C* and C** at the first glance. Hence, "a value of" suffice. This is also more consistent to other entries.

Technically a pointer is a type, this should mean "a pointer value". And "a pointer value of type `C*`" is somewhat confusing between `C*` and `C**` at the first glance. Hence, "a value of" suffice. This is also more consistent to other entries.
@jwakely
Copy link
Member

jwakely commented Nov 26, 2024

Technically a pointer is a type

"pointer to C" is a type, a pointer is not a type. In core wording, a pointer is a value.

Expressions produce pointers, pointers refer to allocated storage, pointers are used as operands to a delete-expression etc.

@jwakely
Copy link
Member

jwakely commented Nov 26, 2024

N.B. we can't say it's a pointer value that points to an object of type C, because it is typically uninitialized storage until that pointer is passed to construct. That's why it uses the unconventional "through which indirection is valid" wording. LWG3064 is somewhat related.

@frederick-vs-ja
Copy link
Contributor

LWG3064 is somewhat related.

Possibly off-topic: The resolution of CWG453 clarifies that binding a reference to an out-of-lifetime (yet-to-construct) object can be well-defined. So I think LWG3064 can be considered resolved.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 18, 2025

Agreed with @jwakely: the current wording is neither unusual nor confusing, and I don't see a pressing need for a change. Please get in touch if there's new information and you feel strongly.

@tkoeppe tkoeppe closed this Jun 18, 2025
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.

4 participants