The header <iostream>
declares objects that associate objects with the
standard C streams provided for by the functions declared in
<cstdio>, and includes all the headers necessary to use these objects.
The objects are constructed and the associations are established at some
time prior to or during the first time an object of class
ios_base::Init is constructed, and in any case before the body
of main ([basic.start.main]) begins execution.
The objects are not destroyed during program execution.288
The results of including <iostream> in a translation unit shall be as if
<iostream> defined an instance of ios_base::Init with static
storage duration.
Mixing operations on corresponding wide- and narrow-character streams
follows the same semantics as mixing such operations on
FILEs,
as specified in the C standard library.
Concurrent access to a synchronized ([ios.members.static]) standard iostream object's formatted and unformatted input ([istream]) and output ([ostream]) functions or a standard C stream by multiple threads does not result in a data race ([intro.multithread]).
Constructors and destructors for objects with
static storage duration can
access these objects to read input from
stdin
or write output to
stdout
or
stderr.