Document number: N2259=07-0119

Howard E. Hinnant

Specify header dependency for <iostream>

This paper splits the first part of N2186 for the purpose of creating a single, votable item. The original paper contained several independent proposals.

Proposed text

In [iostream.objects]:

Header <iostream> synopsis

    #include <ios>
    #include <streambuf>
    #include <istream>
    #include <ostream>

    namespace std {
      extern istream cin;
      extern ostream cout;
      extern ostream cerr;
      extern ostream clog;
      extern wistream wcin;
      extern wostream wcout;
      extern wostream wcerr;
      extern wostream wclog;

The header <iostream> declares objects that associate objects with the standard C streams provided for by the functions declared in <cstdio>, and includes all of the headers neccesary to use these objects.