31 Input/output library [input.output]

31.5 Iostreams base classes [iostreams.base]

31.5.3 Class template fpos [fpos]

31.5.3.2 Requirements [fpos.operations]

Table 123: Position type requirements [tab:fpos.operations]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
P(o)
P
converts from offset
Effects: Value-initializes the state object.
P p(o);
P p = o;
Effects: Value-initializes the state object.

Postconditions: p == P(o) is true.
P()
P
P(0)
P p;
P p(0);
O(p)
streamoff
converts to offset
P(O(p)) == p
p == q
bool
Remarks: For any two values o and o2, if p is obtained from o converted to P or from a copy of such P value and if q is obtained from o2 converted to P or from a copy of such P value, then p == q is true only if o == o2 is true.
p != q
bool
!(p == q)
p + o
P
+ offset
Remarks: With ql = p + o;, then: ql - o == p
pl += o
P&
+= offset
Remarks: With ql = pl; before the +=, then: pl - o == ql
p - o
P
- offset
Remarks: With ql = p - o;, then: ql + o == p
pl -= o
P&
-= offset
Remarks: With ql = pl; before the -=, then: pl + o == ql
o + p
convertible to P
p + o
P(o + p) == p + o
p - q
streamoff
distance
p == q + (p - q)