Title
Missing requirement on representation of integer values
Status
c++17
Section
6.8.2 [basic.fundamental]
Submitter
Richard Smith

Created on 2015-12-15.00:00:00 last changed 36 months ago

Messages

Date: 2017-01-15.00:00:00

Proposed resolution (January, 2017):

Change 6.8.2 [basic.fundamental] paragraph 3 as follows:

...The standard and extended unsigned integer types are collectively called unsigned integer types. The range of non-negative values of a signed integer type is a subrange of the corresponding unsigned integer type, the representation of the same value in each of the two types is the same, and the value representation of each corresponding signed/unsigned type shall be the same. The standard signed integer types...
Date: 2017-02-15.00:00:00

[Adopted at the February/March, 2017 meeting.]

According to 6.8.2 [basic.fundamental] paragraph 3,

The range of non-negative values of a signed integer type is a subrange of the corresponding unsigned integer type, and the value representation of each corresponding signed/unsigned type shall be the same.

The corresponding wording from C11 is,

The range of nonnegative values of a signed integer type is a subrange of the corresponding unsigned integer type, and the representation of the same value in each type is the same.

The C wording is arguably clearer, but it loses the implication of the C++ wording that the sign bit of a signed type is part of the value representation of the corresponding unsigned type.

History
Date User Action Args
2018-02-27 00:00:00adminsetstatus: tentatively ready -> c++17
2017-02-06 00:00:00adminsetmessages: + msg5726
2015-12-15 00:00:00admincreate