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

CA-086 20.2.6p5 [obj.lifetime] Allow 0 for the second parameter to start_lifetime_as_array #459

Closed
wg21bot opened this issue Oct 24, 2022 · 4 comments · Fixed by cplusplus/draft#6114

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 24, 2022

0 should be a permitted value for the second parameter (to start_lifetime_as_array). This would make code interacting with this function easier to write and less error prone.

Remove paragraph 5.

Adjust paragraph 6 such that equivalence is maintained only if the previous precondition is met. If n is 0 then a pointer which compares equal to p is returned but which may only be used in the manner which past-the-end pointers may be used.

@wg21bot wg21bot added the LEWG Library Evolution label Oct 24, 2022
@wg21bot wg21bot added this to the CD C++23 milestone Oct 24, 2022
@jensmaurer jensmaurer changed the title CA 20.2.6p5 [obj.lifetime] Allow 0 for the second parameter to start_lifetime_as_array CA-086 20.2.6p5 [obj.lifetime] Allow 0 for the second parameter to start_lifetime_as_array Nov 3, 2022
@FabioFracassi
Copy link
Collaborator

FabioFracassi commented Nov 9, 2022

2022-11-07 10:00 to 11:30 UTC-10 Kona Library Evolution Meeting

CA-086: Allow 0 for the second parameter to start_lifetime_as_array

2022-11-07 10:00 to 11:30 UTC-10 Kona Library Evolution Minutes

Champion: Robert Leahy (in-person)

Chair: Bryce Adelstein Lelbach & Fabio Fracassi

Minute Taker: Inbal Levi

Start: 2022-11-07 11:22 UTC-10

POLL: 0 should be a permitted as the size parameter to start_lifetime_as_array.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 16 5 2 0

Attendance: 23 (in-person) + 16 (remote)

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor.

This needs Evolution/Core input.

End: 11:35

Next Steps

Refer CA-086 to Evolution and Core.

@jensmaurer
Copy link
Member

jensmaurer commented Nov 10, 2022

CWG 2022-11-10: Reviewed D2679R1; no concerns after updates.

@JeffGarland
Copy link
Member

I've set this to lwg-ready, because Library is done. CWG will be responsible for poll.

@jwakely
Copy link
Member

jwakely commented Mar 23, 2023

Accepted with modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Tentatively Ready
6 participants