29 Input/output library [input.output]

29.3 Forward declarations [iostream.forward]

29.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, basic_­filebuf, and basic_­syncbuf.
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, basic_­ofstream, and basic_­osyncstream.
The class template specialization basic_­iostream<charT, traits> serves as a base class for class templates basic_­stringstream and basic_­fstream.
[Note
:
For each of the class templates above, the program is ill-formed if traits​::​char_­type is not the same type as charT ([char.traits]).
— end note
]
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.
[Example
:
The types streampos and wstreampos are used for positioning streams specialized on char and wchar_­t respectively.
— end example
]
[Note
:
This synopsis suggests a circularity between streampos and char_­traits<char>.
An implementation can avoid this circularity by substituting equivalent types.
— end note
]