30 Input/output library [input.output]

30.3 Forward declarations [iostream.forward]

30.3.2 Overview [iostream.forward.overview]

The class template specialization basic_­ios<charT, traits> serves as a virtual base class for the class templates basic_­istream, basic_­ostream, and class templates derived from them. basic_­iostream is a class template derived from both basic_­istream<charT, traits> and basic_­ostream<charT, traits>.

The class template specialization basic_­streambuf<charT, traits> serves as a base class for class templates basic_­stringbuf and basic_­filebuf.

The class template specialization basic_­istream<charT, traits> serves as a base class for class templates basic_­istringstream and basic_­ifstream.

The class template specialization basic_­ostream<charT, traits> serves as a base class for class templates basic_­ostringstream and basic_­ofstream.

The class template specialization basic_­iostream<charT, traits> serves as a base class for class templates basic_­stringstream and basic_­fstream.

Other typedef-names define instances of class templates specialized for char or wchar_­t types.

Specializations of the class template fpos are used for specifying file position information.

The types streampos and wstreampos are used for positioning streams specialized on char and wchar_­t respectively.

[Note: This synopsis suggests a circularity between streampos and char_­traits<char>. An implementation can avoid this circularity by substituting equivalent types. One way to do this might be

template<class stateT> class fpos { ... };      // depends on nothing
using _STATE = ... ;             // implementation private declaration of stateT

using streampos = fpos<_STATE>;

template<> struct char_traits<char> {
  using pos_type = streampos;
}

end note]