cpp/io/fpos

Specializations of the class template identify absolute positions in a stream or in a file. Each object of type holds the byte position in the stream (typically as a private member of type std) and the current shift state, a value of type  (typically std).

The following typedef names for are provided (although they are spelled differently in the standard, they denote the same type):

All specializations of meet the, , , , and  requirements.

If is trivially copy constructible,  has a trivial copy constructor. If is trivially copy assignable,  has a trivial copy assignment operator. If is trivially destructible,  has a trivial destructor.

Member functions
In addition, member and non-member functions are provided to support the following operations:


 * A default constructor that stores an offset of zero and value-initializes the state object.


 * A non-explicit constructor that accepts an argument of type (possibly const) std, which stores that offset and value-initializes the state object. This constructor must also accept the special value : the constructed in this manner is returned by some stream operations to indicate errors.


 * Explicit conversion from (possibly const) to std. The result is the stored offset.


 * and that compare two objects of type (possibly const)  and returns a value of type convertible to .  is equivalent to.


 * and such that, for an object  of type (possibly const)  and an object  of type (possibly const) std
 * has type and stores an offset that is the result of adding  to the offset of
 * has a type convertible to and the result of the conversion is equal to
 * has type and stores an offset that is the result of subtracting  from the offset of


 * and which can accept a (possibly const) std and adds/subtracts it from the stored offset, respectively.


 * which can subtract two objects of type (possibly const) producing an std, such that for two such objects  and ,