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 · 12 comments
Closed

P1401 Narrowing contextual conversions to bool #188

jensmaurer opened this issue Jan 26, 2019 · 12 comments

Comments

@jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Jan 26, 2019

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 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 and removed EWG 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 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 removed this from the 2019-02 milestone Feb 24, 2019
@jfbastien jfbastien added this to the 2019-07 milestone Feb 24, 2019
@jensmaurer jensmaurer removed this from the 2019-07 milestone Mar 21, 2019
@wg21bot
Copy link
Collaborator

@wg21bot 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 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

@jensmaurer jensmaurer removed this from the 2019-07 milestone Aug 24, 2019
@wg21bot
Copy link
Collaborator

@wg21bot 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
@theres-waldo
Copy link
Collaborator

@theres-waldo theres-waldo commented Nov 7, 2019

EWG-I in Belfast

Forward the paper as presented to EWG?
unanimous consent

@theres-waldo theres-waldo added EWG and removed EWGI 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 removed this from the 2019-11 milestone Jan 22, 2020
@jensmaurer jensmaurer added this to the 2020-02 milestone Jan 22, 2020
@jfbastien jfbastien moved this from Unscheduled to Wednesday in EWG Prague Jan 23, 2020
@jfbastien
Copy link
Collaborator

@jfbastien jfbastien commented Feb 12, 2020

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

@jensmaurer jensmaurer removed this from the 2020-02 milestone Feb 18, 2020
@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Jun 17, 2020

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

@wg21bot wg21bot added this to the 2020-telecon milestone Jun 17, 2020
@jfbastien
Copy link
Collaborator

@jfbastien jfbastien commented Oct 1, 2020

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

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Oct 21, 2020

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

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

@jfbastien jfbastien commented Mar 9, 2021

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.

@jensmaurer jensmaurer moved this from Ready for review to Approved for plenary vote in CWG Apr 12, 2021
@jensmaurer
Copy link
Member Author

@jensmaurer jensmaurer commented Apr 12, 2021

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

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Apr 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
CWG
Approved for plenary vote
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants