Open xmh0511 opened 2 years ago
Isn't the value representation for integer types also implementation-defined?
This part is tracked in CWG2827. Representable range is made specified more detailedly via CWG2723, but the most negative/positive finite values are not yet said implementation-defined.
I'm not sure whether "The value representation of floating-point types is implementation-defined" already implies that "the meaning of each bit pattern of the value representation of a floating-point type is implementation-defined". If so, no change seems needed here.
[basic.fundamental] p12 says
For other integer types, we did not emphasize this point for them. Isn't the value representation for integer types also implementation-defined? Consider the impact for the value representation with the difference between big-endian and little-endian in a concrete environment, and assume the width for
short int
is always16.The example wants to convey that saying the value representation is implementation-defined does not mean the range of representable values is implementation-defined too.
So, saying that the value representation of floating-point types is implementation-defined is not all that important here. It is not helpful for interpreting whether a floating-pointer type can represent positive infinity or not. As said in https://github.com/cplusplus/draft/issues/5407#issuecomment-1107394398, we consider the existence of these values for a floating-pointer type is implementation-defined, which means that we care more about the range of representable values. I think, change the above rule to that
which is more helpful.