C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: What makes bool{2} ill-formed?
From: Matthew Woehlke (mwoehlke.floss_at_[hidden])
Date: 2020-08-10 08:48:13


On 07/08/2020 11.36, Lyberta via Std-Discussion wrote:
> Matthew Woehlke via Std-Discussion:
>> `bool{2}` is invalid (narrowing) for the same reason `char{65536}` is invalid.
>
> char{65536} is implementation-defined.

Well, if you take off your pedant's hat, I clearly meant
char{literal_value_outside_of_char's_range}.

That said, what implementations have CHAR_BITS > 16?

-- 
Matthew

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

Older Archives on Google Groups