Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-04-13


1515. Modulo 2n arithmetic for implicitly-unsigned types

Section:6.8.2  [basic.fundamental]    Status:CD3    Submitter:Sean Hunt    Date:2012-07-03

[Moved to DR at the April, 2013 meeting.]

According to 6.8.2 [basic.fundamental] paragraph 4,

Unsigned integers, declaredunsigned, shall obey the laws ofarithmetic modulo 2n wheren is the number ofbits in the value representation of that particular size of integer.

It is not clear whether this wording intentionally excludes typeslikechar16_t andchar32_t (and, possibly, typeschar andwchar_t, if those types are unsigned ina given implementation), since theunsigned keyword is notused in their declaration.

Proposed resolution (October, 2012):

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

Unsigned integers, declaredunsigned, shall obeythe laws of arithmetic modulo 2n wheren isthe number of bits in the value representation of that particular sizeof integer.46



[8]ページ先頭

©2009-2025 Movatter.jp