std::fpos<State>::state

Manages the file position state.

# Declarations

State state() const;
void state( State st );

# Parameters

# Example

#include <cwchar>
#include <iostream>
#include <sstream>
 
int main()
{
    std::istringstream s("test");
    std::mbstate_t st = s.tellg().state();
 
    if (std::mbsinit(&st))
        std::cout << "The stream is in the initial shift state\n";
}

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 441C++98overload (1) was not declared const (it is const in the synopsis)added const

# See also