Created on 2012-01-28.00:00:00 last changed 131 months ago
[Moved to DR at the October, 2012 meeting.]
Proposed resolution (February, 2012):
Change 9.4.5 [dcl.init.list] paragraph 7 as follows:
A narrowing conversion is an implicit conversion
...
from an integer type or unscoped enumeration type to an integer type that cannot represent all the values of the original type, except where the source is a constant expression
and the actual value after conversionwhose value after integral promotions will fit into the target typeand will produce the original value when converted back to the original type.[Note:...
According to 9.4.5 [dcl.init.list] paragraph 7, an implicit conversion
from an integer type or unscoped enumeration type to an integer type that cannot represent all the values of the original type, except where the source is a constant expression and the actual value after conversion will fit into the target type and will produce the original value when converted back to the original type.
As is made plain in the examples in that paragraph, a conversion of a negative value to an unsigned type is intended to be a narrowing conversion; however, the phrase “actual value after conversion” makes this intent unclear, especially since the round-trip conversion between signed and unsigned types might well yield the original value.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-05-03 00:00:00 | admin | set | status: dr -> drwp |
2012-11-03 00:00:00 | admin | set | messages: + msg4150 |
2012-11-03 00:00:00 | admin | set | status: ready -> dr |
2012-02-27 00:00:00 | admin | set | messages: + msg3726 |
2012-01-28 00:00:00 | admin | create |