Created on 2018-06-04.00:00:00 last changed 3 weeks ago
This wording is relative to N4910.
Modify in [fpos.operations] as indicated:
(1.1) — […]
(1.5) — o refer
sto avalue of type streamoff or const streamoff.
Table 119: Position type requirements [tab:fpos.operations] Expression Return type Operational
… P p(o);
P p = o;
Effects: Value-initializes the
Postconditions: p == P(o)
… O(p) streamoff converts to offset P(O(p)) == p p != q convertible to bool !(p == q) …
[ 2022-05-01; Daniel comments and provides wording ]
The proposed wording does intentionally not use a form involving addition or subtraction to prevent the need for extra wording that ensures that this computed value is well-defined. According to [stream.types], streamoff is a signed basic integral type, so we know what equality means for such values.
[ 2018-06-23 after reflector discussion ]
Priority set to 4
The fpos requirements do not give any idea what is compared by operator== (even after Daniel's P0759R1 paper). I'd like something to make it clear that return true; is not a valid implementation of operator==(const fpos<T>&, const fpos<T>&). Maybe in the P(o) row state that "p == P(o)" and "p != P(o + 1)", i.e. two fpos objects constructed from the same streamoff values are equal, and two fpos objects constructed from two different streamoff values are not equal.
|2022-05-01 17:17:39||admin||set||messages: + msg12444|
|2022-05-01 17:17:39||admin||set||messages: + msg12443|
|2018-06-25 00:47:25||admin||set||messages: + msg9984|