From Jason Turner

[iostream.objects]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwgrh7fxu/{from.md → to.md} +22 -23
tmp/tmpwgrh7fxu/{from.md → to.md} RENAMED
@@ -22,111 +22,110 @@ namespace std {
22
  ```
23
 
24
  ### Overview <a id="iostream.objects.overview">[[iostream.objects.overview]]</a>
25
 
26
  In this Clause, the type name `FILE` refers to the type `FILE` declared
27
- in `<cstdio>` ([[cstdio.syn]]).
28
 
29
  The header `<iostream>` declares objects that associate objects with the
30
- standard C streams provided for by the functions declared in
31
- `<cstdio>` ([[c.files]]), and includes all the headers necessary to use
32
- these objects.
33
 
34
  The objects are constructed and the associations are established at some
35
  time prior to or during the first time an object of class
36
  `ios_base::Init` is constructed, and in any case before the body of
37
- `main` ([[basic.start.main]]) begins execution.[^2] The objects are not
38
  destroyed during program execution.[^3] The results of including
39
  `<iostream>` in a translation unit shall be as if `<iostream>` defined
40
  an instance of `ios_base::Init` with static storage duration.
41
 
42
  Mixing operations on corresponding wide- and narrow-character streams
43
  follows the same semantics as mixing such operations on `FILE`s, as
44
  specified in the C standard library.
45
 
46
- Concurrent access to a synchronized ([[ios.members.static]]) standard
47
- iostream object’s formatted and unformatted input ([[istream]]) and
48
- output ([[ostream]]) functions or a standard C stream by multiple
49
- threads shall not result in a data race ([[intro.multithread]]).
50
 
51
  [*Note 1*: Users must still synchronize concurrent use of these objects
52
  and streams by multiple threads if they wish to avoid interleaved
53
  characters. — *end note*]
54
 
55
-  ISO C 7.21.2.
56
 
57
  ### Narrow stream objects <a id="narrow.stream.objects">[[narrow.stream.objects]]</a>
58
 
59
  ``` cpp
60
  istream cin;
61
  ```
62
 
63
  The object `cin` controls input from a stream buffer associated with the
64
- object `stdin`, declared in `<cstdio>` ([[cstdio.syn]]).
65
 
66
  After the object `cin` is initialized, `cin.tie()` returns `&cout`. Its
67
- state is otherwise the same as required for
68
- `basic_ios<char>::init` ([[basic.ios.cons]]).
69
 
70
  ``` cpp
71
  ostream cout;
72
  ```
73
 
74
  The object `cout` controls output to a stream buffer associated with the
75
- object `stdout`, declared in `<cstdio>` ([[cstdio.syn]]).
76
 
77
  ``` cpp
78
  ostream cerr;
79
  ```
80
 
81
  The object `cerr` controls output to a stream buffer associated with the
82
- object `stderr`, declared in `<cstdio>` ([[cstdio.syn]]).
83
 
84
  After the object `cerr` is initialized, `cerr.flags() & unitbuf` is
85
  nonzero and `cerr.tie()` returns `&cout`. Its state is otherwise the
86
- same as required for `basic_ios<char>::init` ([[basic.ios.cons]]).
87
 
88
  ``` cpp
89
  ostream clog;
90
  ```
91
 
92
  The object `clog` controls output to a stream buffer associated with the
93
- object `stderr`, declared in `<cstdio>` ([[cstdio.syn]]).
94
 
95
  ### Wide stream objects <a id="wide.stream.objects">[[wide.stream.objects]]</a>
96
 
97
  ``` cpp
98
  wistream wcin;
99
  ```
100
 
101
  The object `wcin` controls input from a stream buffer associated with
102
- the object `stdin`, declared in `<cstdio>` ([[cstdio.syn]]).
103
 
104
  After the object `wcin` is initialized, `wcin.tie()` returns `&wcout`.
105
  Its state is otherwise the same as required for
106
- `basic_ios<wchar_t>::init` ([[basic.ios.cons]]).
107
 
108
  ``` cpp
109
  wostream wcout;
110
  ```
111
 
112
  The object `wcout` controls output to a stream buffer associated with
113
- the object `stdout`, declared in `<cstdio>` ([[cstdio.syn]]).
114
 
115
  ``` cpp
116
  wostream wcerr;
117
  ```
118
 
119
  The object `wcerr` controls output to a stream buffer associated with
120
- the object `stderr`, declared in `<cstdio>` ([[cstdio.syn]]).
121
 
122
  After the object `wcerr` is initialized, `wcerr.flags() & unitbuf` is
123
  nonzero and `wcerr.tie()` returns `&wcout`. Its state is otherwise the
124
- same as required for `basic_ios<wchar_t>::init` ([[basic.ios.cons]]).
125
 
126
  ``` cpp
127
  wostream wclog;
128
  ```
129
 
130
  The object `wclog` controls output to a stream buffer associated with
131
- the object `stderr`, declared in `<cstdio>` ([[cstdio.syn]]).
132
 
 
22
  ```
23
 
24
  ### Overview <a id="iostream.objects.overview">[[iostream.objects.overview]]</a>
25
 
26
  In this Clause, the type name `FILE` refers to the type `FILE` declared
27
+ in `<cstdio>`.
28
 
29
  The header `<iostream>` declares objects that associate objects with the
30
+ standard C streams provided for by the functions declared in `<cstdio>`,
31
+ and includes all the headers necessary to use these objects.
 
32
 
33
  The objects are constructed and the associations are established at some
34
  time prior to or during the first time an object of class
35
  `ios_base::Init` is constructed, and in any case before the body of
36
+ `main` [[basic.start.main]] begins execution.[^2] The objects are not
37
  destroyed during program execution.[^3] The results of including
38
  `<iostream>` in a translation unit shall be as if `<iostream>` defined
39
  an instance of `ios_base::Init` with static storage duration.
40
 
41
  Mixing operations on corresponding wide- and narrow-character streams
42
  follows the same semantics as mixing such operations on `FILE`s, as
43
  specified in the C standard library.
44
 
45
+ Concurrent access to a synchronized [[ios.members.static]] standard
46
+ iostream object’s formatted and unformatted input [[istream]] and output
47
+ [[ostream]] functions or a standard C stream by multiple threads does
48
+ not result in a data race [[intro.multithread]].
49
 
50
  [*Note 1*: Users must still synchronize concurrent use of these objects
51
  and streams by multiple threads if they wish to avoid interleaved
52
  characters. — *end note*]
53
 
54
+ See also: ISO C 7.21.2
55
 
56
  ### Narrow stream objects <a id="narrow.stream.objects">[[narrow.stream.objects]]</a>
57
 
58
  ``` cpp
59
  istream cin;
60
  ```
61
 
62
  The object `cin` controls input from a stream buffer associated with the
63
+ object `stdin`, declared in `<cstdio>`.
64
 
65
  After the object `cin` is initialized, `cin.tie()` returns `&cout`. Its
66
+ state is otherwise the same as required for `basic_ios<char>::init`
67
+ [[basic.ios.cons]].
68
 
69
  ``` cpp
70
  ostream cout;
71
  ```
72
 
73
  The object `cout` controls output to a stream buffer associated with the
74
+ object `stdout`, declared in `<cstdio>`.
75
 
76
  ``` cpp
77
  ostream cerr;
78
  ```
79
 
80
  The object `cerr` controls output to a stream buffer associated with the
81
+ object `stderr`, declared in `<cstdio>`.
82
 
83
  After the object `cerr` is initialized, `cerr.flags() & unitbuf` is
84
  nonzero and `cerr.tie()` returns `&cout`. Its state is otherwise the
85
+ same as required for `basic_ios<char>::init` [[basic.ios.cons]].
86
 
87
  ``` cpp
88
  ostream clog;
89
  ```
90
 
91
  The object `clog` controls output to a stream buffer associated with the
92
+ object `stderr`, declared in `<cstdio>`.
93
 
94
  ### Wide stream objects <a id="wide.stream.objects">[[wide.stream.objects]]</a>
95
 
96
  ``` cpp
97
  wistream wcin;
98
  ```
99
 
100
  The object `wcin` controls input from a stream buffer associated with
101
+ the object `stdin`, declared in `<cstdio>`.
102
 
103
  After the object `wcin` is initialized, `wcin.tie()` returns `&wcout`.
104
  Its state is otherwise the same as required for
105
+ `basic_ios<wchar_t>::init` [[basic.ios.cons]].
106
 
107
  ``` cpp
108
  wostream wcout;
109
  ```
110
 
111
  The object `wcout` controls output to a stream buffer associated with
112
+ the object `stdout`, declared in `<cstdio>`.
113
 
114
  ``` cpp
115
  wostream wcerr;
116
  ```
117
 
118
  The object `wcerr` controls output to a stream buffer associated with
119
+ the object `stderr`, declared in `<cstdio>`.
120
 
121
  After the object `wcerr` is initialized, `wcerr.flags() & unitbuf` is
122
  nonzero and `wcerr.tie()` returns `&wcout`. Its state is otherwise the
123
+ same as required for `basic_ios<wchar_t>::init` [[basic.ios.cons]].
124
 
125
  ``` cpp
126
  wostream wclog;
127
  ```
128
 
129
  The object `wclog` controls output to a stream buffer associated with
130
+ the object `stderr`, declared in `<cstdio>`.
131