Namespaces
Variants
Actions

std::basic_ios

From cppreference.com
< cpp‎ | io
 
 
 
 
Defined in header <ios>
template<

    class CharT,
    class Traits = std::char_traits<CharT>
> class basic_ios

    : public std::ios_base

The class std::basic_ios provides facilities for interfacing with objects that have std::basic_streambuf interface. Several std::basic_ios objects can refer to one actual std::basic_streambuf object.

cpp/io/ios basestd-basic ios-inheritance.svg

Inheritance diagram

Several typedefs for common character types are provided:

Defined in header <ios>
Type Definition
std::ios std::basic_ios<char>
std::wios std::basic_ios<wchar_t>

Contents

[edit] Member types

Member type Definition
char_type CharT[edit]
traits_type Traits; the program is ill-formed if Traits::char_type is not CharT.[edit]
int_type Traits::int_type[edit]
pos_type Traits::pos_type[edit]
off_type Traits::off_type[edit]

[edit] Public member functions

constructs the object
(public member function) [edit]
[virtual]
destructs the object
(virtual public member function) [edit]
operator=
the copy assignment operator is deleted
(public member function)
State functions
checks if no error has occurred i.e. I/O operations are available
(public member function) [edit]
checks if end-of-file has been reached
(public member function) [edit]
checks if an error has occurred
(public member function) [edit]
checks if a non-recoverable error has occurred
(public member function) [edit]
checks if an error has occurred (synonym of fail())
(public member function) [edit]
checks if no error has occurred (synonym of !fail())
(public member function) [edit]
returns state flags
(public member function) [edit]
sets state flags
(public member function) [edit]
modifies state flags
(public member function) [edit]
Formatting
copies formatting information
(public member function) [edit]
manages the fill character
(public member function) [edit]
Miscellaneous
manages exception mask
(public member function) [edit]
sets the locale
(public member function) [edit]
manages associated stream buffer
(public member function) [edit]
manages tied stream
(public member function) [edit]
narrows characters
(public member function) [edit]
widens characters
(public member function) [edit]

[edit] Protected member functions

initializes a default-constructed std::basic_ios
(protected member function) [edit]
(C++11)
moves from another std::basic_ios except for rdbuf
(protected member function) [edit]
(C++11)
swaps with another std::basic_ios except for rdbuf
(protected member function) [edit]
replaces the rdbuf without clearing its error state
(protected member function)