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

[range.prim.size] When is ranges::size ill-formed? #3597

Closed
JohelEGP opened this issue Dec 31, 2019 · 6 comments
Closed

[range.prim.size] When is ranges::size ill-formed? #3597

JohelEGP opened this issue Dec 31, 2019 · 6 comments
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@JohelEGP
Copy link
Contributor

http://wg21.link/LWG3264 suggests that ranges::size should be ill-formed when the corresponding disable_sized_range is true for the non-array case. If its PR is to be correct, the current wording ladder should nest the next-to-last item in the sublist.

@JohelEGP
Copy link
Contributor Author

Otherwise, ranges::size is never ill-formed on a range, as when disable_sized_range is true, it'll simply return make-unsigned-like(ranges​::​end(E) - ranges​::​begin(E)), and so you can never opt-out of sized_range.

@jensmaurer
Copy link
Member

This sounds like a change with normative impact, and thus needs to go to LWG. Please submit an issue.

@jensmaurer jensmaurer added lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. labels Dec 31, 2019
@JohelEGP
Copy link
Contributor Author

Hopefully @CaseyCarter can clarify in LWG3264.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Jan 7, 2020

Please submit an issue.

Done. Waiting for its number.

@JohelEGP
Copy link
Contributor Author

This is handled by https://wg21.link/LWG3368.

@JohelEGP JohelEGP closed this as completed Mar 7, 2020
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Mar 7, 2020

LWG3368 merged: #3752.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

No branches or pull requests

2 participants