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

P1401 Narrowing contextual conversions to bool #188

Closed
jensmaurer opened this issue Jan 26, 2019 · 13 comments · Fixed by cplusplus/draft#4665
Closed

P1401 Narrowing contextual conversions to bool #188

jensmaurer opened this issue Jan 26, 2019 · 13 comments · Fixed by cplusplus/draft#4665
Labels
C++23 Targeted at C++23 CWG Core plenary-approved Papers approved for inclusion in their target vehicle by plenary vote.
Milestone

Comments

@jensmaurer
Copy link
Member

P1401R0 Narrowing contextual conversions to bool (Andrzej Krzemienski)

@jensmaurer jensmaurer added this to the 2019-02 milestone Jan 26, 2019
@jensmaurer jensmaurer added the EWG Evolution label Jan 26, 2019
@villevoutilainen villevoutilainen added this to Friday in EWGKonaFeb2019 Feb 10, 2019
@villevoutilainen villevoutilainen removed this from Friday in EWGKonaFeb2019 Feb 10, 2019
@villevoutilainen villevoutilainen added EWGI Evolution Incubator and removed EWG Evolution labels Feb 10, 2019
@jfbastien jfbastien added this to Maybe in EWGIKonaFeb2019 Feb 16, 2019
@jfbastien jfbastien moved this from Backlog to EWGITuesday in EWGIKonaFeb2019 Feb 20, 2019
@jfbastien
Copy link
Collaborator

jfbastien commented Feb 24, 2019

EWG-I in Kona:
Do we want to see this paper again?
SF F N A SA
2 5 5 0 0

@jfbastien jfbastien modified the milestones: 2019-02, 2019-07 Feb 24, 2019
@jensmaurer jensmaurer removed this from the 2019-07 milestone Mar 21, 2019
@wg21bot
Copy link
Collaborator

wg21bot commented Jun 23, 2019

P1401R1 Narrowing contextual conversions to bool (Andrzej Krzemieński)

@wg21bot wg21bot added this to the 2019-07 milestone Jun 23, 2019
@jensmaurer jensmaurer added this to Tuesday in EWG-I in Cologne 2019 Jul 11, 2019
@jfbastien
Copy link
Collaborator

jfbastien commented Jul 18, 2019

EWG-I in Cologne
Leave the specification as it is: no narrowing is allowed.
SF F N A SA
1 2 3 8 1
Allow implicit conversion of int to bool in constexpr context.
SF F N A SA
2 6 2 4 2

@jfbastien jfbastien added the needs-revision Paper needs changes before it can proceed label Jul 18, 2019
@jensmaurer jensmaurer removed this from the 2019-07 milestone Aug 24, 2019
@wg21bot
Copy link
Collaborator

wg21bot commented Oct 15, 2019

P1401R2 Narrowing contextual conversions to bool (Andrzej Krzemieński)

@wg21bot wg21bot added this to the 2019-11 milestone Oct 15, 2019
@jfbastien jfbastien removed the needs-revision Paper needs changes before it can proceed label Oct 15, 2019
@theres-waldo
Copy link
Collaborator

EWG-I in Belfast

Forward the paper as presented to EWG?
unanimous consent

@theres-waldo theres-waldo added EWG Evolution and removed EWGI Evolution Incubator labels Nov 7, 2019
@jfbastien jfbastien added this to Friday in EWGBelfast2019 Nov 7, 2019
@jfbastien jfbastien added this to Unscheduled in EWG Prague Jan 22, 2020
@jensmaurer jensmaurer modified the milestones: 2019-11, 2020-02 Jan 22, 2020
@jfbastien jfbastien moved this from Unscheduled to Wednesday in EWG Prague Jan 23, 2020
@jfbastien
Copy link
Collaborator

EWG Prague Wednesday afternoon:

Adopt P1401r2 as is?

SF F N A SA
4 9 8 5 1

Adopt P1401r2 but only allow integral (including enums) conversions

SF F N A SA
1 7 2 10 6

@jfbastien jfbastien added the needs-revision Paper needs changes before it can proceed label Feb 12, 2020
@jensmaurer jensmaurer removed this from the 2020-02 milestone Feb 18, 2020
@wg21bot
Copy link
Collaborator

wg21bot commented Jun 17, 2020

P1401R3 Narrowing contextual conversions to bool (Andrzej Krzemieński)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Jun 17, 2020
@wg21bot wg21bot added this to the 2020-telecon milestone Jun 17, 2020
@jfbastien
Copy link
Collaborator

Seen at yesterday's EWG telecon.

POLL: After adding an example, P1401R3 is tentatively ready to go CWG.

SF F N A SA
11 12 2 0 1

@jfbastien jfbastien added the EWG-vote-on-me EWG can vote on this label Oct 1, 2020
@wg21bot
Copy link
Collaborator

wg21bot commented Oct 21, 2020

P1401R4 Narrowing contextual conversions to bool (Andrzej Krzemieński)

@jensmaurer jensmaurer modified the milestones: 2020-telecon, 2021-telecon Dec 28, 2020
@jensmaurer jensmaurer added this to Ready for review in CWG Feb 2, 2021
@jfbastien
Copy link
Collaborator

EWG February 2021 polls:

Poll: Forward P1401R4 "Narrowing contextual conversions to bool" to Core.

SF F N A SA
13 13 3 0 0

Poll outcome: ✅ consensus.

Salient comments:

  • Increases consistency.
  • The decision this paper is undoing is yet another example of an attempt to move the language in a particular direction, but without a complete migration plan. These incomplete migrations make the language incoherent and frustrating.
  • I wish we could go the other direction and disallow any conversions to bool everywhere (including from integer and pointer types, regardless of context, allowing only user-defined conversions), but there’s no way we’ll ever get there from here. C++ is a language that thinks non-boolean types have boolean properties, and we shouldn’t make exceptions to that based on context.

@jfbastien jfbastien added CWG Core and removed EWG Evolution EWG-vote-on-me EWG can vote on this labels Mar 9, 2021
@jensmaurer jensmaurer moved this from Ready for review to Approved for plenary vote in CWG Apr 12, 2021
@jensmaurer
Copy link
Member Author

CWG 2021-04-12: Approved D1401R5 for plenary vote.

@jensmaurer jensmaurer added the straw-poll Straw poll label Apr 12, 2021
@wg21bot
Copy link
Collaborator

wg21bot commented Apr 25, 2021

P1401R5 Narrowing contextual conversions to bool (Andrzej Krzemieński)

@cor3ntin cor3ntin added plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. C++23 Targeted at C++23 labels Jun 7, 2021
@wg21bot
Copy link
Collaborator

wg21bot commented Oct 26, 2021

Adopted 2021-06.

@jensmaurer jensmaurer removed the straw-poll Straw poll label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++23 Targeted at C++23 CWG Core plenary-approved Papers approved for inclusion in their target vehicle by plenary vote.
Projects
CWG
Approved for plenary vote
Development

Successfully merging a pull request may close this issue.

6 participants