From Jason Turner

[iostream.objects.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmprz35v0hn/{from.md → to.md} +14 -28
tmp/tmprz35v0hn/{from.md → to.md} RENAMED
@@ -1,47 +1,33 @@
1
  ### Overview <a id="iostream.objects.overview">[[iostream.objects.overview]]</a>
2
 
3
- ``` cpp
4
- #include <ios>
5
- #include <streambuf>
6
- #include <istream>
7
- #include <ostream>
8
-
9
- namespace std {
10
- extern istream cin;
11
- extern ostream cout;
12
- extern ostream cerr;
13
- extern ostream clog;
14
-
15
- extern wistream wcin;
16
- extern wostream wcout;
17
- extern wostream wcerr;
18
- extern wostream wclog;
19
- }
20
- ```
21
 
22
  The header `<iostream>` declares objects that associate objects with the
23
  standard C streams provided for by the functions declared in
24
  `<cstdio>` ([[c.files]]), and includes all the headers necessary to use
25
  these objects.
26
 
27
  The objects are constructed and the associations are established at some
28
  time prior to or during the first time an object of class
29
  `ios_base::Init` is constructed, and in any case before the body of
30
- `main` begins execution.[^2] The objects are not destroyed during
31
- program execution.[^3] The results of including `<iostream>` in a
32
- translation unit shall be as if `<iostream>` defined an instance of
33
- `ios_base::Init` with static storage duration. Similarly, the entire
34
- program shall behave as if there were at least one instance of
35
- `ios_base::Init` with static storage duration.
36
 
37
  Mixing operations on corresponding wide- and narrow-character streams
38
  follows the same semantics as mixing such operations on `FILE`s, as
39
- specified in Amendment 1 of the ISO C standard.
40
 
41
  Concurrent access to a synchronized ([[ios.members.static]]) standard
42
  iostream object’s formatted and unformatted input ([[istream]]) and
43
  output ([[ostream]]) functions or a standard C stream by multiple
44
- threads shall not result in a data race ([[intro.multithread]]). Users
45
- must still synchronize concurrent use of these objects and streams by
46
- multiple threads if they wish to avoid interleaved characters.
 
 
 
 
47
 
 
1
  ### Overview <a id="iostream.objects.overview">[[iostream.objects.overview]]</a>
2
 
3
+ In this Clause, the type name `FILE` refers to the type `FILE` declared
4
+ in `<cstdio>` ([[cstdio.syn]]).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  The header `<iostream>` declares objects that associate objects with the
7
  standard C streams provided for by the functions declared in
8
  `<cstdio>` ([[c.files]]), and includes all the headers necessary to use
9
  these objects.
10
 
11
  The objects are constructed and the associations are established at some
12
  time prior to or during the first time an object of class
13
  `ios_base::Init` is constructed, and in any case before the body of
14
+ `main` ([[basic.start.main]]) begins execution.[^2] The objects are not
15
+ destroyed during program execution.[^3] The results of including
16
+ `<iostream>` in a translation unit shall be as if `<iostream>` defined
17
+ an instance of `ios_base::Init` with static storage duration.
 
 
18
 
19
  Mixing operations on corresponding wide- and narrow-character streams
20
  follows the same semantics as mixing such operations on `FILE`s, as
21
+ specified in the C standard library.
22
 
23
  Concurrent access to a synchronized ([[ios.members.static]]) standard
24
  iostream object’s formatted and unformatted input ([[istream]]) and
25
  output ([[ostream]]) functions or a standard C stream by multiple
26
+ threads shall not result in a data race ([[intro.multithread]]).
27
+
28
+ [*Note 1*: Users must still synchronize concurrent use of these objects
29
+ and streams by multiple threads if they wish to avoid interleaved
30
+ characters. — *end note*]
31
+
32
+  ISO C 7.21.2.
33