[ios.overview]

# 31 Input/output library [[input.output]](./#input.output)

## 31.5 Iostreams base classes [[iostreams.base]](iostreams.base#ios.overview)

### 31.5.4 Class template basic_ios [[ios]](ios#overview)

#### 31.5.4.1 Overview [ios.overview]

[ð](#lib:basic_ios)

namespace std {template<class charT, class traits = char_traits<charT>>class basic_ios : public ios_base {public:using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [[iostate.flags]](iostate.flags "31.5.4.4 Flags functions"), flags functionsexplicit operator bool() const; bool operator!() const;
 iostate rdstate() const; void clear(iostate state = goodbit); void setstate(iostate state); bool good() const; bool eof() const; bool fail() const; bool bad() const;

 iostate exceptions() const; void exceptions(iostate except); // [[basic.ios.cons]](basic.ios.cons "31.5.4.2 Constructors"), constructor/destructorexplicit basic_ios(basic_streambuf<charT, traits>* sb); virtual ~basic_ios(); // [[basic.ios.members]](basic.ios.members "31.5.4.3 Member functions"), members basic_ostream<charT, traits>* tie() const;
 basic_ostream<charT, traits>* tie(basic_ostream<charT, traits>* tiestr);

 basic_streambuf<charT, traits>* rdbuf() const;
 basic_streambuf<charT, traits>* rdbuf(basic_streambuf<charT, traits>* sb);

 basic_ios& copyfmt(const basic_ios& rhs);

 char_type fill() const;
 char_type fill(char_type ch);

 locale imbue(const locale& loc); char narrow(char_type c, char dfault) const;
 char_type widen(char c) const;

 basic_ios(const basic_ios&) = delete;
 basic_ios& operator=(const basic_ios&) = delete; protected: basic_ios(); void init(basic_streambuf<charT, traits>* sb); void move(basic_ios& rhs); void move(basic_ios&& rhs); void swap(basic_ios& rhs) noexcept; void set_rdbuf(basic_streambuf<charT, traits>* sb); };}
