C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: What makes bool{2} ill-formed?
From: Johannes Schaub (schaub.johannes_at_[hidden])
Date: 2020-08-06 15:33:53


Am Do., 6. Aug. 2020 um 22:11 Uhr schrieb Gennaro Prota <
gennaro.prota_at_[hidden]>:

> On Thu, Aug 6, 2020, 21:59 Johannes Schaub via Std-Discussion <
> std-discussion_at_[hidden]> wrote:
> [...]
>
>> I made an issue report years ago about this, and the discussion
>> unfortunately ended up being about whether 'false' is a valid null pointer
>> constant, rather than more generally whether the set of values of bool
>> actually _is_ {0, 1}.
>> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1448 .
>>
>
> To me, the text of your report seems to be focused on that. It's not like
> it "ended up" there.
>
>
It's classified as a closed issue report, because "The resolution of issue
903 <http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#903>
makes it clear that false is not a null pointer constant." . But my initial
report was also focused on narrowing conversions: 'int{nonconst_true}' and
'int{nonconst_false}' is meant to work but that doesn't appear to follow
from our rules.



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups