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

Add extra notes to ranges::c* to mirror ranges::* #6046

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

strega-nil-ms
Copy link

Given the new changes to cbegin and friends from P2278R4, where they are no longer simple wrappers around begin and friends, it is (in my opinion) confusing that they lack a similar note about how "ill-formed means substitution failure".

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 9, 2023

What about ranges::ssize?

Is the reason that we don't have notes here that the items in question are "expression-equivalent" to one of the items with notes, and those those notes apply transitively?

@CaseyCarter
Copy link
Contributor

Is the reason that we don't have notes here that the items in question are "expression-equivalent" to one of the items with notes, and those notes apply transitively?

Roughly. The notes (which should maybe be normative) are to clarify the cases where the wording explicitly says "cpo_expression(meow) is ill-formed". It's "clear enough" that "cpo_expression(meow) is expression-equivalent to other_expression" implies that cpo_expression(meow) is ill-formed in the immediate context of a template instantiation when and if other_expression is, but e.g. "If T is an array of unknown bound, ranges::empty(E) is ill-formed." could mean any kind of ill-formed.

@CaseyCarter
Copy link
Contributor

CaseyCarter commented Nov 10, 2023

I suppose by my argument, "If ranges::size(t) is ill-formed, ranges::ssize(E) is ill-formed." requires a note. Shout if you'd like me to add one in a separate PR (strega-nil-ms probably has better things to do).

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2023

Do the notes describe a consequence of existing specification, or state a novel requirement?

@jwakely
Copy link
Member

jwakely commented Nov 10, 2023

Do the notes describe a consequence of existing specification, or state a novel requirement?

That has been the subject of some debate.

@tkoeppe tkoeppe added the lwg Issue must be reviewed by LWG. label Nov 10, 2023
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
  翻译: