A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/iostream.objects below:

[iostream.objects]

30.4.1 Header <iostream> synopsis [iostream.syn]
#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;
}
30.4.2 Overview [iostream.objects.overview]

In this Clause, the type name FILE refers to the type FILE declared in <cstdio>.

The header <iostream> declares objects that associate objects with the standard C streams provided for by the functions declared in <cstdio> ([c.files]), 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 begins execution.288 The objects are not destroyed during program execution.289 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 and output functions or a standard C stream by multiple threads shall not result in a data race. [Note: Users must still synchronize concurrent use of these objects and streams by multiple threads if they wish to avoid interleaved characters. end note]

See also: ISO C 7.21.2.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4