C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Did the standard committee vote to make integer comparisons do the right thing?
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-11-06 16:31:27


On Wednesday, 6 November 2019 14:21:29 PST Brian Bi via Std-Discussion wrote:
> On March 13, 2018, I was told that the standard committee voted 5/17/5/4/0
> to make integer comparisons do the right thing, e.g., `-1 < 0U` will become
> true, whereas in C++17, it is false thanks to the "usual arithmetic
> conversions"

How about:
 -1 < 2147483648U

Is that true or false?

Please don't say "promote to 64-bit" because that immediately triggers asking
about
 -1 < UINT64_C(9223372036854775808)

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

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

Older Archives on Google Groups