Am Do., 6. Aug. 2020 um 20:46 Uhr schrieb Matthew Woehlke via Std-Discussion <>:
On 06/08/2020 11.30, Florian Weimer via Std-Discussion wrote:
> I don't think there is another meaningful way to get an int into a bool.

   auto x = static_cast<bool>(2);
   auto x = !!2;
   auto x = (2 ? true : false);

I don't see the problem here; `bool{2}` is invalid (narrowing) for the
same reason `char{65536}` is invalid. (Numerically speaking, the set of
values which `bool` can represent is {0, 1}.)

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}. .