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

[concept.boolean] Rephrase first requirement #2888

Merged
merged 1 commit into from May 21, 2019

Conversation

CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented May 21, 2019

requires ConvertibleTo<const remove_reference_t<B>&, bool>; is a simplification of b1; requires ConvertibleTo<decltype(b1), bool>; which would have been cleaned up to { b1 } -> ConvertibleTo<bool>; (the intended requirement) post P1084, had it not been simplified in P0896.

Drive-by: reorder the binary expression requirements consistently as b1 op b2, b1 op a, a op b2.

@CaseyCarter
Copy link
Contributor Author

CaseyCarter commented May 21, 2019

reorder the binary expression requirements consistently

I should point out that this technically has normative impact due to the short-circuiting nature of requires-expressions: there are sets of parameters which would have failed to satisfy the prior formulation that would result in an ill-formed program with the proposed formulation, and vice versa. I can confirm that the design intent is that the first two compound-requirements precede the others and that the order of the others is not significant, but I'll of course understand if the editors would like LWG to give this change the nod.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be prepared to apply the first change (b1 is ConvertibleTo<bool>) editorially if @jwakely approves, but while the reordering looks sane (i.e. more orderly) in general, I'd like to have @zygoloid's opinion on whether that is editorial.
In short, please remove the drive-by fixes from this pull request and create a new one with just the reordering.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label May 21, 2019
Copy link
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the first bit looks good to me.

I'm also OK with the reordering, but agree it's the editor's call.

`requires ConvertibleTo<const remove_reference_t<B>&, bool>;` is a simplification of `b1; requires ConvertibleTo<decltype(b1), bool>;` which would have been cleaned up to `{ b1 } -> ConvertibleTo<bool>;` (the intended requirement) post P1084, had it not been simplified in P0896.
@CaseyCarter
Copy link
Contributor Author

In short, please remove the drive-by fixes from this pull request and create a new one with just the reordering.

Done.

@jensmaurer jensmaurer removed the changes requested Changes to the wording or approach have been requested and not yet applied. label May 21, 2019
@jensmaurer jensmaurer merged commit 40241be into cplusplus:master May 21, 2019
@CaseyCarter CaseyCarter deleted the boolean_cleanup branch December 16, 2019 22:16
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.

None yet

3 participants