Operations specified in Table [tab:iostreams.position.requirements] are permitted. In that table,
P refers to an instance of fpos,
p and q refer to values of type P,
O refers to type streamoff,
o refers to a value of type streamoff,
sz refers to a value of type streamsize and
i refers to a value of type int.
Expression | Return type | Operational | Assertion/note |
semantics | pre-/post-condition | ||
P(i) |
p == P(i) note: a destructor is assumed. | ||
P p(i); P p = i; | post: p == P(i). | ||
P(o) | fpos | converts from offset | |
O(p) | streamoff | converts to offset | P(O(p)) == p |
p == q | convertible to bool | == is an equivalence relation | |
p != q | convertible to bool | !(p == q) | |
q = p + o p += o | fpos | + offset | q - o == p |
q = p - o p -= o | fpos | - offset | q + o == p |
o = p - q | streamoff | distance | q + o == p |
streamsize(o) O(sz) |
streamsize streamoff |
converts converts |
streamsize(O(sz)) == sz streamsize(O(sz)) == sz |
[ Note: Every implementation is required to supply overloaded operators on fpos objects to satisfy the requirements of [fpos.operations]. It is unspecified whether these operators are members of fpos, global operators, or provided in some other way. — end note ]