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

US195 18.05.2 Remove concept "boolean" and use convertible_to<bool> instead P1934 P1964 #193

Closed
wg21bot opened this issue Oct 23, 2019 · 6 comments · Fixed by cplusplus/draft#3786
Labels
Projects
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 23, 2019

The boolean concept is over-complicated and fails to capture what it intends because doing so would require it to be recursive (i.e., b satisfies boolean iff the expression b && b also satisfies boolean, etc.). LEWG decided in Cologne that the boolean concept should be removed and all uses of it in the library be replaced with convertible_to<bool>.

Proposed change:
Remove the boolean concept and replace all uses of it with convertible_to<bool>.

@tituswinters
Copy link

LEWG in Belfast: Forward to LWG for C++20.
(Prioritization on this vs. other paper-sized NB comments will be shared with LWG chair when LEWG finishes NB comment processing.)

@dietmarkuehl
Copy link

dietmarkuehl commented Nov 6, 2019

LWG small group looked at that on Wednesday morning: there is paper P1934 cplusplus/papers#680. There is also alternative D1964 (attached to the LEWG wiki). We probably want to have LEWG look at that before following the recommendation.

@jensmaurer jensmaurer added this to Inbox in LWG Nov 7, 2019
@jensmaurer jensmaurer changed the title US195 18.05.2 Remove concept "boolean" and use convertible_to<bool> instead US195 18.05.2 Remove concept "boolean" and use convertible_to<bool> instead P1934 Nov 19, 2019
@jensmaurer
Copy link
Member

jensmaurer commented Dec 11, 2019

See also P1964 Casting convertible_to<bool> considered harmful cplusplus/papers#698

@jensmaurer jensmaurer changed the title US195 18.05.2 Remove concept "boolean" and use convertible_to<bool> instead P1934 US195 18.05.2 Remove concept "boolean" and use convertible_to<bool> instead P1934 P1964 Dec 11, 2019
@jensmaurer jensmaurer added LEWG Library Evolution and removed LWG Library labels Dec 11, 2019
@JeffGarland
Copy link
Member

Reviewed Monday afternoon full group in Prague -- P1964 will be reviewed later.

@tituswinters tituswinters added LWG Library and removed LEWG Library Evolution concepts Concepts labels Feb 11, 2020
@JeffGarland
Copy link
Member

LWG Tuesday afternoon in Prague - accept 1964 for C++20

@jensmaurer
Copy link
Member

Accepted with modification. See paper P1964R1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
LWG
Accepted
Development

Successfully merging a pull request may close this issue.

6 participants