You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Required expression i += n where n is the (signed) difference type. To evaluate, n is first converted to unsigned ([conv.integral]):
If the destination type is unsigned, the resulting value is the least unsigned integer congruent to the source integer (modulo 2n where n is the number of bits used to represent the unsigned type). [ Note: In a two’s complement representation, this conversion is conceptual and there is no change in the bit pattern (if there is no truncation). —end note ]
Any sane semantics for RandomAccessIterable would give the result of i += n the same result as n applications of ++i (or of -n applications of --i if n is negative). I need to sit down and characterize the situations in which that is not true (if any).
Note that for a type like unsigned char, given the way difference_type_t is defined in the Ranges TS, the difference type will likely have more bits than unsigned char.
The text was updated successfully, but these errors were encountered:
Required expression
i += n
wheren
is the (signed) difference type. To evaluate,n
is first converted to unsigned ([conv.integral]):Any sane semantics for RandomAccessIterable would give the result of
i += n
the same result asn
applications of++i
(or of-n
applications of--i
ifn
is negative). I need to sit down and characterize the situations in which that is not true (if any).Note that for a type like
unsigned char
, given the waydifference_type_t
is defined in the Ranges TS, the difference type will likely have more bits thanunsigned char
.The text was updated successfully, but these errors were encountered: