libstdc++: std::fpos< _StateT > Class Template Reference

libstdc++

std::fpos< _StateT > Class Template Reference

`#include <postypes.h>`

## Public Member Functions
| fpos (const fpos &)=default
| fpos (streamoff __off)
| operator streamoff () const
fpos | operator+ (streamoff __off) const
fpos & | operator+= (streamoff __off)
streamoff | operator- (const fpos &__other) const
fpos | operator- (streamoff __off) const
fpos & | operator-= (streamoff __off)
fpos & | operator= (const fpos &)=default
_StateT | state () const
void | state (_StateT __st)

## Detailed Description

template<typename _StateT>
class std::fpos< _StateT >

Class representing stream positions.

The standard places no requirements upon the template parameter StateT. In this implementation StateT must be DefaultConstructible, CopyConstructible and Assignable. The standard only requires that fpos should contain a member of type StateT. In this implementation it also contains an offset stored as a signed integer.

Parameters

  StateT | Type passed to and returned from state().

Definition at line 87 of file postypes.h.

## Constructor & Destructor Documentation

## ◆ fpos() [1/2]

template<typename _StateT>

std::fpos< _StateT >::fpos | ( |  | ) |
| inline

Definition at line 98 of file postypes.h.

## ◆ fpos() [2/2]

template<typename _StateT>

std::fpos< _StateT >::fpos | ( | streamoff | __off | ) |
| inline

Construct position from offset.

Definition at line 108 of file postypes.h.

## Member Function Documentation

## ◆ operator streamoff()

template<typename _StateT>

std::fpos< _StateT >::operator streamoff | ( |  | ) | const
| inline

Convert to streamoff.

Definition at line 118 of file postypes.h.

## ◆ operator+()

template<typename _StateT>

fpos std::fpos< _StateT >::operator+ | ( | streamoff | __off | ) | const
| inline

Add position and offset.

Definition at line 159 of file postypes.h.

## ◆ operator+=()

template<typename _StateT>

fpos & std::fpos< _StateT >::operator+= | ( | streamoff | __off | ) |
| inline

Add offset to this position.

Definition at line 135 of file postypes.h.

## ◆ operator-() [1/2]

template<typename _StateT>

streamoff std::fpos< _StateT >::operator- | ( | const fpos< _StateT > & | __other | ) | const
| inline

Subtract position to return offset.

Definition at line 186 of file postypes.h.

## ◆ operator-() [2/2]

template<typename _StateT>

fpos std::fpos< _StateT >::operator- | ( | streamoff | __off | ) | const
| inline

Subtract offset from position.

Definition at line 173 of file postypes.h.

## ◆ operator-=()

template<typename _StateT>

fpos & std::fpos< _StateT >::operator-= | ( | streamoff | __off | ) |
| inline

Subtract offset from this position.

Definition at line 146 of file postypes.h.

## ◆ state() [1/2]

template<typename _StateT>

_StateT std::fpos< _StateT >::state | ( |  | ) | const
| inline

Return the last set value of st.

Definition at line 127 of file postypes.h.

## ◆ state() [2/2]

template<typename _StateT>

void std::fpos< _StateT >::state | ( | _StateT | __st | ) |
| inline

Remember the value of st.

Definition at line 122 of file postypes.h.

The documentation for this class was generated from the following file:

- postypes.h