std::fpos

From Cppreference

< cpp | io
Jump to: navigation, search
Defined in header <ios>

template< class State >
class fpos;

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

Four specializations of std::fpos are provided:

Defined in header <ios>
Type Definition
streampos std::fpos<std::char_traits<char>::state_type>
u16streampos std::fpos<std::char_traits<char16_t>::state_type>
u32streampos std::fpos<std::char_traits<char32_t>::state_type>
wstreampos std::fpos<std::char_traits<wchar_t>::state_type>

[edit] Member functions

gets/sets the value of the shift state
(public member function)

In addition, the following member functions and operators must be provided, altbough it's unspecified if they are members or non-member.

[edit] See also

represents relative file/stream position (offset from fpos), sufficient to represent any file size
(typedef)
returns the output position indicator
(public member function of std::basic_ostream)
sets the output position indicator
(public member function of std::basic_ostream)
gets the file position indicator
(function)