From Jason Turner

[c.files]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvfyowmhq/{from.md → to.md} +344 -57
tmp/tmpvfyowmhq/{from.md → to.md} RENAMED
@@ -1,25 +1,171 @@
1
- ### C library files <a id="c.files">[[c.files]]</a>
2
 
3
- Table  [[tab:iostreams.hdr.cstdio]] describes header `<cstdio>`. C++does
4
- not define the function `gets`.
5
 
6
- Calls to the function `tmpnam` with an argument of `NULL` may introduce
7
- a data race ([[res.on.data.races]]) with other calls to `tmpnam` with
8
- an argument of `NULL`.
 
 
 
9
 
10
- ISO C 7.9, Amendment 1 4.6.2.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- Table  [[tab:iostreams.hdr.cinttypes]] describes header `<cinttypes>`.
13
- The macros defined by `<cinttypes>` are provided unconditionally. In
14
- particular, the symbol `__STDC_FORMAT_MACROS`, mentioned in footnote 182
15
- of the C standard, plays no role in C++.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- The contents of header `<cinttypes>` are the same as the Standard C
18
- Library header `<inttypes.h>`, with the following changes:
19
 
20
- - the header `<cinttypes>` includes the header `<cstdint>` instead of
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  `<stdint.h>`, and
22
  - if and only if the type `intmax_t` designates an extended integer
23
  type ([[basic.fundamental]]), the following function signatures are
24
  added:
25
  ``` cpp
@@ -29,97 +175,220 @@ Library header `<inttypes.h>`, with the following changes:
29
 
30
  which shall have the same semantics as the function signatures
31
  `intmax_t imaxabs(intmax_t)` and
32
  `imaxdiv_t imaxdiv(intmax_t, intmax_t)`, respectively.
33
 
 
 
34
  <!-- Link reference definitions -->
35
  [adjustfield.manip]: #adjustfield.manip
 
36
  [basefield.manip]: #basefield.manip
37
  [basic.fundamental]: basic.md#basic.fundamental
38
  [basic.ios.cons]: #basic.ios.cons
39
  [basic.ios.members]: #basic.ios.members
 
 
40
  [bitmask.types]: library.md#bitmask.types
41
  [c.files]: #c.files
 
 
 
42
  [enumerated.types]: library.md#enumerated.types
43
  [error.reporting]: #error.reporting
44
  [ext.manip]: #ext.manip
45
  [fig:streampos]: #fig:streampos
46
  [file.streams]: #file.streams
47
  [filebuf]: #filebuf
48
  [filebuf.assign]: #filebuf.assign
49
  [filebuf.cons]: #filebuf.cons
50
  [filebuf.members]: #filebuf.members
51
  [filebuf.virtuals]: #filebuf.virtuals
 
 
52
  [floatfield.manip]: #floatfield.manip
53
  [fmtflags.manip]: #fmtflags.manip
54
  [fmtflags.state]: #fmtflags.state
55
  [fpos]: #fpos
56
  [fpos.members]: #fpos.members
57
  [fpos.operations]: #fpos.operations
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  [fstream]: #fstream
59
  [fstream.assign]: #fstream.assign
60
  [fstream.cons]: #fstream.cons
61
  [fstream.members]: #fstream.members
62
- [fstreams]: #fstreams
63
  [ifstream]: #ifstream
64
  [ifstream.assign]: #ifstream.assign
65
  [ifstream.cons]: #ifstream.cons
66
  [ifstream.members]: #ifstream.members
 
67
  [input.output]: #input.output
68
  [input.output.general]: #input.output.general
69
  [input.streams]: #input.streams
70
  [intro.multithread]: intro.md#intro.multithread
 
71
  [ios]: #ios
72
  [ios.base]: #ios.base
73
  [ios.base.callback]: #ios.base.callback
74
  [ios.base.cons]: #ios.base.cons
75
  [ios.base.locales]: #ios.base.locales
76
  [ios.base.storage]: #ios.base.storage
77
  [ios.members.static]: #ios.members.static
78
  [ios.overview]: #ios.overview
 
79
  [ios.types]: #ios.types
80
  [ios::Init]: #ios::Init
81
  [ios::failure]: #ios::failure
82
  [ios::fmtflags]: #ios::fmtflags
83
  [ios::iostate]: #ios::iostate
84
  [ios::openmode]: #ios::openmode
85
  [ios::seekdir]: #ios::seekdir
 
86
  [iostate.flags]: #iostate.flags
87
  [iostream.assign]: #iostream.assign
88
  [iostream.cons]: #iostream.cons
89
  [iostream.dest]: #iostream.dest
90
  [iostream.format]: #iostream.format
91
- [iostream.format.overview]: #iostream.format.overview
92
  [iostream.forward]: #iostream.forward
 
93
  [iostream.limits.imbue]: #iostream.limits.imbue
94
  [iostream.objects]: #iostream.objects
95
  [iostream.objects.overview]: #iostream.objects.overview
 
96
  [iostreamclass]: #iostreamclass
97
  [iostreams.base]: #iostreams.base
98
- [iostreams.base.overview]: #iostreams.base.overview
99
  [iostreams.limits.pos]: #iostreams.limits.pos
100
  [iostreams.requirements]: #iostreams.requirements
101
  [iostreams.threadsafety]: #iostreams.threadsafety
102
  [istream]: #istream
103
  [istream.assign]: #istream.assign
104
  [istream.cons]: #istream.cons
 
105
  [istream.formatted]: #istream.formatted
106
  [istream.formatted.arithmetic]: #istream.formatted.arithmetic
107
  [istream.formatted.reqmts]: #istream.formatted.reqmts
108
  [istream.manip]: #istream.manip
109
  [istream.rvalue]: #istream.rvalue
 
110
  [istream.unformatted]: #istream.unformatted
111
- [istream::extractors]: #istream::extractors
112
  [istream::sentry]: #istream::sentry
113
  [istringstream]: #istringstream
114
  [istringstream.assign]: #istringstream.assign
115
  [istringstream.cons]: #istringstream.cons
116
  [istringstream.members]: #istringstream.members
117
- [limits]: language.md#limits
118
  [locale.codecvt.virtuals]: localization.md#locale.codecvt.virtuals
119
  [locale.num.get]: localization.md#locale.num.get
120
  [narrow.stream.objects]: #narrow.stream.objects
 
121
  [ofstream]: #ofstream
122
  [ofstream.assign]: #ofstream.assign
123
  [ofstream.cons]: #ofstream.cons
124
  [ofstream.members]: #ofstream.members
125
  [ostream]: #ostream
@@ -131,24 +400,25 @@ Library header `<inttypes.h>`, with the following changes:
131
  [ostream.inserters.arithmetic]: #ostream.inserters.arithmetic
132
  [ostream.inserters.character]: #ostream.inserters.character
133
  [ostream.manip]: #ostream.manip
134
  [ostream.rvalue]: #ostream.rvalue
135
  [ostream.seeks]: #ostream.seeks
 
136
  [ostream.unformatted]: #ostream.unformatted
137
  [ostream::sentry]: #ostream::sentry
138
  [ostringstream]: #ostringstream
139
  [ostringstream.assign]: #ostringstream.assign
140
  [ostringstream.cons]: #ostringstream.cons
141
  [ostringstream.members]: #ostringstream.members
142
  [output.streams]: #output.streams
143
  [quoted.manip]: #quoted.manip
144
  [res.on.data.races]: library.md#res.on.data.races
145
  [res.on.exception.handling]: library.md#res.on.exception.handling
 
146
  [std.ios.manip]: #std.ios.manip
147
  [std.manip]: #std.manip
148
  [stream.buffers]: #stream.buffers
149
- [stream.buffers.overview]: #stream.buffers.overview
150
  [stream.types]: #stream.types
151
  [streambuf]: #streambuf
152
  [streambuf.assign]: #streambuf.assign
153
  [streambuf.buffer]: #streambuf.buffer
154
  [streambuf.cons]: #streambuf.cons
@@ -159,44 +429,53 @@ Library header `<inttypes.h>`, with the following changes:
159
  [streambuf.pub.get]: #streambuf.pub.get
160
  [streambuf.pub.pback]: #streambuf.pub.pback
161
  [streambuf.pub.put]: #streambuf.pub.put
162
  [streambuf.put.area]: #streambuf.put.area
163
  [streambuf.reqts]: #streambuf.reqts
 
164
  [streambuf.virt.buffer]: #streambuf.virt.buffer
165
  [streambuf.virt.get]: #streambuf.virt.get
166
  [streambuf.virt.locales]: #streambuf.virt.locales
167
  [streambuf.virt.pback]: #streambuf.virt.pback
168
  [streambuf.virt.put]: #streambuf.virt.put
169
  [streambuf.virtuals]: #streambuf.virtuals
170
  [string.classes]: strings.md#string.classes
171
  [string.streams]: #string.streams
172
- [string.streams.overview]: #string.streams.overview
173
  [stringbuf]: #stringbuf
174
  [stringbuf.assign]: #stringbuf.assign
175
  [stringbuf.cons]: #stringbuf.cons
176
  [stringbuf.members]: #stringbuf.members
177
  [stringbuf.virtuals]: #stringbuf.virtuals
178
  [strings]: strings.md#strings
179
  [stringstream]: #stringstream
180
  [stringstream.assign]: #stringstream.assign
181
  [stringstream.cons]: #stringstream.cons
182
  [stringstream.members]: #stringstream.members
 
 
 
 
 
 
 
 
 
183
  [tab:iostreams.basicios.init.effects]: #tab:iostreams.basicios.init.effects
184
  [tab:iostreams.copyfmt.effects]: #tab:iostreams.copyfmt.effects
185
  [tab:iostreams.file.open.modes]: #tab:iostreams.file.open.modes
186
  [tab:iostreams.fmtflags.constants]: #tab:iostreams.fmtflags.constants
187
  [tab:iostreams.fmtflags.effects]: #tab:iostreams.fmtflags.effects
188
- [tab:iostreams.hdr.cinttypes]: #tab:iostreams.hdr.cinttypes
189
- [tab:iostreams.hdr.cstdio]: #tab:iostreams.hdr.cstdio
190
  [tab:iostreams.iostate.effects]: #tab:iostreams.iostate.effects
191
  [tab:iostreams.lib.summary]: #tab:iostreams.lib.summary
192
  [tab:iostreams.newoff.values]: #tab:iostreams.newoff.values
193
  [tab:iostreams.openmode.effects]: #tab:iostreams.openmode.effects
194
  [tab:iostreams.position.requirements]: #tab:iostreams.position.requirements
195
  [tab:iostreams.seekdir.effects]: #tab:iostreams.seekdir.effects
196
  [tab:iostreams.seekoff.effects]: #tab:iostreams.seekoff.effects
197
  [tab:iostreams.seekoff.positioning]: #tab:iostreams.seekoff.positioning
 
 
198
  [wide.stream.objects]: #wide.stream.objects
199
 
200
  [^1]: It is the implementation’s responsibility to implement headers so
201
  that including `<iosfwd>` and other headers does not violate the
202
  rules about multiple occurrences of default arguments.
@@ -230,11 +509,11 @@ Library header `<inttypes.h>`, with the following changes:
230
 
231
  [^9]: for example, because it cannot allocate space.
232
 
233
  [^10]: This suggests an infinite amount of copying, but the
234
  implementation can keep track of the maximum element of the arrays
235
- that is non-zero.
236
 
237
  [^11]: Checking `badbit` also for `fail()` is historical practice.
238
 
239
  [^12]: The function signature `dec(ios_base&)` can be called by the
240
  function signature
@@ -246,91 +525,99 @@ Library header `<inttypes.h>`, with the following changes:
246
  to assure that only objects for classes derived from this class may
247
  be constructed.
248
 
249
  [^14]: `underflow` or `uflow` might fail by throwing an exception
250
  prematurely. The intention is not only that the calls will not
251
- return `eof()` but that they will return “immediately.
252
 
253
  [^15]: Classes derived from `basic_streambuf` can provide more efficient
254
  ways to implement `xsgetn()` and `xsputn()` by overriding these
255
  definitions from the base class.
256
 
257
- [^16]: Typically, `overflow` returns `c` to indicate success, except
258
- when `traits::eq_int_type(c,traits::eof())` returns `true`, in which
259
- case it returns `traits::not_eof(c)`.
 
 
260
 
261
- [^17]: This will be possible only in functions that are part of the
 
 
 
 
262
  library. The semantics of the constructor used in user code is as
263
  specified.
264
 
265
- [^18]: The sentry constructor and destructor can also perform additional
266
  implementation-dependent operations.
267
 
268
- [^19]: This is done without causing an `ios::failure` to be thrown.
269
-
270
- [^20]: See, for example, the function signature
271
- `ws(basic_istream&)` ([[istream.manip]]).
272
 
273
  [^21]: See, for example, the function signature
 
 
 
274
  `dec(ios_base&)` ([[basefield.manip]]).
275
 
276
- [^22]: This is done without causing an `ios::failure` to be thrown.
277
-
278
- [^23]: Note that this function is not overloaded on types `signed char`
279
- and `unsigned char`.
280
 
281
  [^24]: Note that this function is not overloaded on types `signed char`
282
  and `unsigned char`.
283
 
284
  [^25]: Note that this function is not overloaded on types `signed char`
285
  and `unsigned char`.
286
 
287
- [^26]: Since the final input character is “extracted,” it is counted in
 
 
 
288
  the `gcount()`, even though it is not stored.
289
 
290
- [^27]: This allows an input line which exactly fills the buffer, without
291
  setting `failbit`. This is different behavior than the historical
292
  AT&T implementation.
293
 
294
- [^28]: This implies an empty input line will not cause `failbit` to be
295
  set.
296
 
297
- [^29]: Note that this function is not overloaded on types `signed char`
298
  and `unsigned char`.
299
 
300
- [^30]: The call `os.tie()->flush()` does not necessarily occur if the
301
  function can determine that no synchronization is necessary.
302
 
303
- [^31]: The `sentry` constructor and destructor can also perform
304
  additional implementation-dependent operations.
305
 
306
- [^32]: without causing an `ios::failure` to be thrown.
307
-
308
- [^33]: See, for example, the function signature
309
- `endl(basic_ostream&)` ([[ostream.manip]]).
310
 
311
  [^34]: See, for example, the function signature
 
 
 
312
  `dec(ios_base&)` ([[basefield.manip]]).
313
 
314
- [^35]: without causing an `ios::failure` to be thrown.
315
-
316
- [^36]: Note that this function is not overloaded on types `signed char`
317
- and `unsigned char`.
318
 
319
  [^37]: Note that this function is not overloaded on types `signed char`
320
  and `unsigned char`.
321
 
322
- [^38]: The expression `cin >>resetiosflags(ios_base::skipws)` clears
 
 
 
323
  `ios_base::skipws` in the format flags stored in the
324
  `basic_istream<charT, traits>` object `cin` (the same as
325
  `cin >> noskipws`), and the expression
326
  `cout << resetiosflags(ios_base::showbase)` clears
327
  `ios_base::showbase` in the format flags stored in the
328
  `basic_ostream<charT, traits>` object `cout` (the same as
329
  `cout << noshowbase`).
330
 
331
- [^39]: The macro `SEEK_END` is defined, and the function signatures
332
  `fopen(const char*, const char*)` and `fseek(FILE*, long, int)` are
333
- declared, in `<cstdio>` ([[c.files]]).
334
 
335
- [^40]: The function signature `fclose(FILE*)` is declared in `<cstdio>`
336
- ([[c.files]]).
 
 
 
1
+ ## C library files <a id="c.files">[[c.files]]</a>
2
 
3
+ ### Header `<cstdio>` synopsis <a id="cstdio.syn">[[cstdio.syn]]</a>
 
4
 
5
+ ``` cpp
6
+ namespace std {
7
+ using size_t = see [support.types.layout];
8
+ using FILE = see below;
9
+ using fpos_t = see below;
10
+ }
11
 
12
+ #define NULL see [support.types.nullptr]
13
+ #define _IOFBF see below
14
+ #define _IOLBF see below
15
+ #define _IONBF see below
16
+ #define BUFSIZ see below
17
+ #define EOF see below
18
+ #define FOPEN_MAX see below
19
+ #define FILENAME_MAX see below
20
+ #define L_tmpnam see below
21
+ #define SEEK_CUR see below
22
+ #define SEEK_END see below
23
+ #define SEEK_SET see below
24
+ #define TMP_MAX see below
25
+ #define stderr see below
26
+ #define stdin see below
27
+ #define stdout see below
28
 
29
+ namespace std {
30
+ int remove(const char* filename);
31
+ int rename(const char* old, const char* new);
32
+ FILE* tmpfile();
33
+ char* tmpnam(char* s);
34
+ int fclose(FILE* stream);
35
+ int fflush(FILE* stream);
36
+ FILE* fopen(const char* filename, const char* mode);
37
+ FILE* freopen(const char* filename, const char* mode, FILE* stream);
38
+ void setbuf(FILE* stream, char* buf);
39
+ int setvbuf(FILE* stream, char* buf, int mode, size_t size);
40
+ int fprintf(FILE* stream, const char* format, ...);
41
+ int fscanf(FILE* stream, const char* format, ...);
42
+ int printf(const char* format, ...);
43
+ int scanf(const char* format, ...);
44
+ int snprintf(char* s, size_t n, const char* format, ...);
45
+ int sprintf(char* s, const char* format, ...);
46
+ int sscanf(const char* s, const char* format, ...);
47
+ int vfprintf(FILE* stream, const char* format, va_list arg);
48
+ int vfscanf(FILE* stream, const char* format, va_list arg);
49
+ int vprintf(const char* format, va_list arg);
50
+ int vscanf(const char* format, va_list arg);
51
+ int vsnprintf(char* s, size_t n, const char* format, va_list arg);
52
+ int vsprintf(char* s, const char* format, va_list arg);
53
+ int vsscanf(const char* s, const char* format, va_list arg);
54
+ int fgetc(FILE* stream);
55
+ char* fgets(char* s, int n, FILE* stream);
56
+ int fputc(int c, FILE* stream);
57
+ int fputs(const char* s, FILE* stream);
58
+ int getc(FILE* stream);
59
+ int getchar();
60
+ int putc(int c, FILE* stream);
61
+ int putchar(int c);
62
+ int puts(const char* s);
63
+ int ungetc(int c, FILE* stream);
64
+ size_t fread(void* ptr, size_t size, size_t nmemb, FILE* stream);
65
+ size_t fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream);
66
+ int fgetpos(FILE* stream, fpos_t* pos);
67
+ int fseek(FILE* stream, long int offset, int whence);
68
+ int fsetpos(FILE* stream, const fpos_t* pos);
69
+ long int ftell(FILE* stream);
70
+ void rewind(FILE* stream);
71
+ void clearerr(FILE* stream);
72
+ int feof(FILE* stream);
73
+ int ferror(FILE* stream);
74
+ void perror(const char* s);
75
+ }
76
+ ```
77
 
78
+ The contents and meaning of the header `<cstdio>` are the same as the C
79
+ standard library header `<stdio.h>`.
80
 
81
+ Calls to the function `tmpnam` with an argument that is a null pointer
82
+ value may introduce a data race ([[res.on.data.races]]) with other
83
+ calls to `tmpnam` with an argument that is a null pointer value.
84
+
85
+ ISO C 7.21.
86
+
87
+ ### Header `<cinttypes>` synopsis <a id="cinttypes.syn">[[cinttypes.syn]]</a>
88
+
89
+ ``` cpp
90
+ #include <cstdint> // see [cstdint.syn]
91
+
92
+ namespace std {
93
+ using imaxdiv_t = see below;
94
+
95
+ intmax_t imaxabs(intmax_t j);
96
+ imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
97
+ intmax_t strtoimax(const char* nptr, char** endptr, int base);
98
+ uintmax_t strtoumax(const char* nptr, char** endptr, int base);
99
+ intmax_t wcstoimax(const wchar_t* nptr, wchar_t** endptr, int base);
100
+ uintmax_t wcstoumax(const wchar_t* nptr, wchar_t** endptr, int base);
101
+
102
+ intmax_t abs(intmax_t); // optional, see below
103
+ imaxdiv_t div(intmax_t, intmax_t); // optional, see below
104
+ }
105
+
106
+ #define PRIdN see below
107
+ #define PRIiN see below
108
+ #define PRIoN see below
109
+ #define PRIuN see below
110
+ #define PRIxN see below
111
+ #define PRIXN see below
112
+ #define SCNdN see below
113
+ #define SCNiN see below
114
+ #define SCNoN see below
115
+ #define SCNuN see below
116
+ #define SCNxN see below
117
+ #define PRIdLEASTN see below
118
+ #define PRIiLEASTN see below
119
+ #define PRIoLEASTN see below
120
+ #define PRIuLEASTN see below
121
+ #define PRIxLEASTN see below
122
+ #define PRIXLEASTN see below
123
+ #define SCNdLEASTN see below
124
+ #define SCNiLEASTN see below
125
+ #define SCNoLEASTN see below
126
+ #define SCNuLEASTN see below
127
+ #define SCNxLEASTN see below
128
+ #define PRIdFASTN see below
129
+ #define PRIiFASTN see below
130
+ #define PRIoFASTN see below
131
+ #define PRIuFASTN see below
132
+ #define PRIxFASTN see below
133
+ #define PRIXFASTN see below
134
+ #define SCNdFASTN see below
135
+ #define SCNiFASTN see below
136
+ #define SCNoFASTN see below
137
+ #define SCNuFASTN see below
138
+ #define SCNxFASTN see below
139
+ #define PRIdMAX see below
140
+ #define PRIiMAX see below
141
+ #define PRIoMAX see below
142
+ #define PRIuMAX see below
143
+ #define PRIxMAX see below
144
+ #define PRIXMAX see below
145
+ #define SCNdMAX see below
146
+ #define SCNiMAX see below
147
+ #define SCNoMAX see below
148
+ #define SCNuMAX see below
149
+ #define SCNxMAX see below
150
+ #define PRIdPTR see below
151
+ #define PRIiPTR see below
152
+ #define PRIoPTR see below
153
+ #define PRIuPTR see below
154
+ #define PRIxPTR see below
155
+ #define PRIXPTR see below
156
+ #define SCNdPTR see below
157
+ #define SCNiPTR see below
158
+ #define SCNoPTR see below
159
+ #define SCNuPTR see below
160
+ #define SCNxPTR see below
161
+ ```
162
+
163
+ The contents and meaning of the header `<cinttypes>` are the same as the
164
+ C standard library header `<inttypes.h>`, with the following changes:
165
+
166
+ - The header `<cinttypes>` includes the header `<cstdint>` instead of
167
  `<stdint.h>`, and
168
  - if and only if the type `intmax_t` designates an extended integer
169
  type ([[basic.fundamental]]), the following function signatures are
170
  added:
171
  ``` cpp
 
175
 
176
  which shall have the same semantics as the function signatures
177
  `intmax_t imaxabs(intmax_t)` and
178
  `imaxdiv_t imaxdiv(intmax_t, intmax_t)`, respectively.
179
 
180
+ ISO C 7.8.
181
+
182
  <!-- Link reference definitions -->
183
  [adjustfield.manip]: #adjustfield.manip
184
+ [allocator.requirements]: library.md#allocator.requirements
185
  [basefield.manip]: #basefield.manip
186
  [basic.fundamental]: basic.md#basic.fundamental
187
  [basic.ios.cons]: #basic.ios.cons
188
  [basic.ios.members]: #basic.ios.members
189
+ [basic.start.main]: basic.md#basic.start.main
190
+ [bidirectional.iterators]: iterators.md#bidirectional.iterators
191
  [bitmask.types]: library.md#bitmask.types
192
  [c.files]: #c.files
193
+ [cinttypes.syn]: #cinttypes.syn
194
+ [cstdio.syn]: #cstdio.syn
195
+ [defns.ntcts]: library.md#defns.ntcts
196
  [enumerated.types]: library.md#enumerated.types
197
  [error.reporting]: #error.reporting
198
  [ext.manip]: #ext.manip
199
  [fig:streampos]: #fig:streampos
200
  [file.streams]: #file.streams
201
  [filebuf]: #filebuf
202
  [filebuf.assign]: #filebuf.assign
203
  [filebuf.cons]: #filebuf.cons
204
  [filebuf.members]: #filebuf.members
205
  [filebuf.virtuals]: #filebuf.virtuals
206
+ [filesystem_error.members]: #filesystem_error.members
207
+ [filesystems]: #filesystems
208
  [floatfield.manip]: #floatfield.manip
209
  [fmtflags.manip]: #fmtflags.manip
210
  [fmtflags.state]: #fmtflags.state
211
  [fpos]: #fpos
212
  [fpos.members]: #fpos.members
213
  [fpos.operations]: #fpos.operations
214
+ [fs.class.directory_entry]: #fs.class.directory_entry
215
+ [fs.class.directory_iterator]: #fs.class.directory_iterator
216
+ [fs.class.file_status]: #fs.class.file_status
217
+ [fs.class.filesystem_error]: #fs.class.filesystem_error
218
+ [fs.class.path]: #fs.class.path
219
+ [fs.class.rec.dir.itr]: #fs.class.rec.dir.itr
220
+ [fs.conform.9945]: #fs.conform.9945
221
+ [fs.conform.os]: #fs.conform.os
222
+ [fs.conformance]: #fs.conformance
223
+ [fs.def.absolute.path]: #fs.def.absolute.path
224
+ [fs.def.filename]: #fs.def.filename
225
+ [fs.def.link]: #fs.def.link
226
+ [fs.def.native]: #fs.def.native
227
+ [fs.def.native.encode]: #fs.def.native.encode
228
+ [fs.def.normal.form]: #fs.def.normal.form
229
+ [fs.def.osdep]: #fs.def.osdep
230
+ [fs.def.path]: #fs.def.path
231
+ [fs.def.pathname]: #fs.def.pathname
232
+ [fs.def.pathres]: #fs.def.pathres
233
+ [fs.def.race]: #fs.def.race
234
+ [fs.def.symlink]: #fs.def.symlink
235
+ [fs.definitions]: #fs.definitions
236
+ [fs.dir.entry.cons]: #fs.dir.entry.cons
237
+ [fs.dir.entry.mods]: #fs.dir.entry.mods
238
+ [fs.dir.entry.obs]: #fs.dir.entry.obs
239
+ [fs.dir.itr.members]: #fs.dir.itr.members
240
+ [fs.dir.itr.nonmembers]: #fs.dir.itr.nonmembers
241
+ [fs.enum]: #fs.enum
242
+ [fs.enum.copy.opts]: #fs.enum.copy.opts
243
+ [fs.enum.dir.opts]: #fs.enum.dir.opts
244
+ [fs.enum.file_type]: #fs.enum.file_type
245
+ [fs.enum.path.format]: #fs.enum.path.format
246
+ [fs.enum.perm.opts]: #fs.enum.perm.opts
247
+ [fs.enum.perms]: #fs.enum.perms
248
+ [fs.err.report]: #fs.err.report
249
+ [fs.file_status.cons]: #fs.file_status.cons
250
+ [fs.file_status.mods]: #fs.file_status.mods
251
+ [fs.file_status.obs]: #fs.file_status.obs
252
+ [fs.filesystem.syn]: #fs.filesystem.syn
253
+ [fs.general]: #fs.general
254
+ [fs.norm.ref]: #fs.norm.ref
255
+ [fs.op.absolute]: #fs.op.absolute
256
+ [fs.op.canonical]: #fs.op.canonical
257
+ [fs.op.copy]: #fs.op.copy
258
+ [fs.op.copy_file]: #fs.op.copy_file
259
+ [fs.op.copy_symlink]: #fs.op.copy_symlink
260
+ [fs.op.create_dir_symlk]: #fs.op.create_dir_symlk
261
+ [fs.op.create_directories]: #fs.op.create_directories
262
+ [fs.op.create_directory]: #fs.op.create_directory
263
+ [fs.op.create_hard_lk]: #fs.op.create_hard_lk
264
+ [fs.op.create_symlink]: #fs.op.create_symlink
265
+ [fs.op.current_path]: #fs.op.current_path
266
+ [fs.op.equivalent]: #fs.op.equivalent
267
+ [fs.op.exists]: #fs.op.exists
268
+ [fs.op.file_size]: #fs.op.file_size
269
+ [fs.op.funcs]: #fs.op.funcs
270
+ [fs.op.hard_lk_ct]: #fs.op.hard_lk_ct
271
+ [fs.op.is_block_file]: #fs.op.is_block_file
272
+ [fs.op.is_char_file]: #fs.op.is_char_file
273
+ [fs.op.is_directory]: #fs.op.is_directory
274
+ [fs.op.is_empty]: #fs.op.is_empty
275
+ [fs.op.is_fifo]: #fs.op.is_fifo
276
+ [fs.op.is_other]: #fs.op.is_other
277
+ [fs.op.is_regular_file]: #fs.op.is_regular_file
278
+ [fs.op.is_socket]: #fs.op.is_socket
279
+ [fs.op.is_symlink]: #fs.op.is_symlink
280
+ [fs.op.last_write_time]: #fs.op.last_write_time
281
+ [fs.op.permissions]: #fs.op.permissions
282
+ [fs.op.proximate]: #fs.op.proximate
283
+ [fs.op.read_symlink]: #fs.op.read_symlink
284
+ [fs.op.relative]: #fs.op.relative
285
+ [fs.op.remove]: #fs.op.remove
286
+ [fs.op.remove_all]: #fs.op.remove_all
287
+ [fs.op.rename]: #fs.op.rename
288
+ [fs.op.resize_file]: #fs.op.resize_file
289
+ [fs.op.space]: #fs.op.space
290
+ [fs.op.status]: #fs.op.status
291
+ [fs.op.status_known]: #fs.op.status_known
292
+ [fs.op.symlink_status]: #fs.op.symlink_status
293
+ [fs.op.temp_dir_path]: #fs.op.temp_dir_path
294
+ [fs.op.weakly_canonical]: #fs.op.weakly_canonical
295
+ [fs.path.append]: #fs.path.append
296
+ [fs.path.assign]: #fs.path.assign
297
+ [fs.path.compare]: #fs.path.compare
298
+ [fs.path.concat]: #fs.path.concat
299
+ [fs.path.construct]: #fs.path.construct
300
+ [fs.path.cvt]: #fs.path.cvt
301
+ [fs.path.decompose]: #fs.path.decompose
302
+ [fs.path.factory]: #fs.path.factory
303
+ [fs.path.fmt.cvt]: #fs.path.fmt.cvt
304
+ [fs.path.gen]: #fs.path.gen
305
+ [fs.path.generic]: #fs.path.generic
306
+ [fs.path.generic.obs]: #fs.path.generic.obs
307
+ [fs.path.io]: #fs.path.io
308
+ [fs.path.itr]: #fs.path.itr
309
+ [fs.path.member]: #fs.path.member
310
+ [fs.path.modifiers]: #fs.path.modifiers
311
+ [fs.path.native.obs]: #fs.path.native.obs
312
+ [fs.path.nonmember]: #fs.path.nonmember
313
+ [fs.path.query]: #fs.path.query
314
+ [fs.path.req]: #fs.path.req
315
+ [fs.path.type.cvt]: #fs.path.type.cvt
316
+ [fs.race.behavior]: #fs.race.behavior
317
+ [fs.rec.dir.itr.members]: #fs.rec.dir.itr.members
318
+ [fs.rec.dir.itr.nonmembers]: #fs.rec.dir.itr.nonmembers
319
+ [fs.req]: #fs.req
320
+ [fs.req.namespace]: #fs.req.namespace
321
  [fstream]: #fstream
322
  [fstream.assign]: #fstream.assign
323
  [fstream.cons]: #fstream.cons
324
  [fstream.members]: #fstream.members
325
+ [fstream.syn]: #fstream.syn
326
  [ifstream]: #ifstream
327
  [ifstream.assign]: #ifstream.assign
328
  [ifstream.cons]: #ifstream.cons
329
  [ifstream.members]: #ifstream.members
330
+ [input.iterators]: iterators.md#input.iterators
331
  [input.output]: #input.output
332
  [input.output.general]: #input.output.general
333
  [input.streams]: #input.streams
334
  [intro.multithread]: intro.md#intro.multithread
335
+ [iomanip.syn]: #iomanip.syn
336
  [ios]: #ios
337
  [ios.base]: #ios.base
338
  [ios.base.callback]: #ios.base.callback
339
  [ios.base.cons]: #ios.base.cons
340
  [ios.base.locales]: #ios.base.locales
341
  [ios.base.storage]: #ios.base.storage
342
  [ios.members.static]: #ios.members.static
343
  [ios.overview]: #ios.overview
344
+ [ios.syn]: #ios.syn
345
  [ios.types]: #ios.types
346
  [ios::Init]: #ios::Init
347
  [ios::failure]: #ios::failure
348
  [ios::fmtflags]: #ios::fmtflags
349
  [ios::iostate]: #ios::iostate
350
  [ios::openmode]: #ios::openmode
351
  [ios::seekdir]: #ios::seekdir
352
+ [iosfwd.syn]: #iosfwd.syn
353
  [iostate.flags]: #iostate.flags
354
  [iostream.assign]: #iostream.assign
355
  [iostream.cons]: #iostream.cons
356
  [iostream.dest]: #iostream.dest
357
  [iostream.format]: #iostream.format
 
358
  [iostream.forward]: #iostream.forward
359
+ [iostream.forward.overview]: #iostream.forward.overview
360
  [iostream.limits.imbue]: #iostream.limits.imbue
361
  [iostream.objects]: #iostream.objects
362
  [iostream.objects.overview]: #iostream.objects.overview
363
+ [iostream.syn]: #iostream.syn
364
  [iostreamclass]: #iostreamclass
365
  [iostreams.base]: #iostreams.base
 
366
  [iostreams.limits.pos]: #iostreams.limits.pos
367
  [iostreams.requirements]: #iostreams.requirements
368
  [iostreams.threadsafety]: #iostreams.threadsafety
369
  [istream]: #istream
370
  [istream.assign]: #istream.assign
371
  [istream.cons]: #istream.cons
372
+ [istream.extractors]: #istream.extractors
373
  [istream.formatted]: #istream.formatted
374
  [istream.formatted.arithmetic]: #istream.formatted.arithmetic
375
  [istream.formatted.reqmts]: #istream.formatted.reqmts
376
  [istream.manip]: #istream.manip
377
  [istream.rvalue]: #istream.rvalue
378
+ [istream.syn]: #istream.syn
379
  [istream.unformatted]: #istream.unformatted
 
380
  [istream::sentry]: #istream::sentry
381
  [istringstream]: #istringstream
382
  [istringstream.assign]: #istringstream.assign
383
  [istringstream.cons]: #istringstream.cons
384
  [istringstream.members]: #istringstream.members
385
+ [lex.charset]: lex.md#lex.charset
386
  [locale.codecvt.virtuals]: localization.md#locale.codecvt.virtuals
387
  [locale.num.get]: localization.md#locale.num.get
388
  [narrow.stream.objects]: #narrow.stream.objects
389
+ [numeric.limits]: language.md#numeric.limits
390
  [ofstream]: #ofstream
391
  [ofstream.assign]: #ofstream.assign
392
  [ofstream.cons]: #ofstream.cons
393
  [ofstream.members]: #ofstream.members
394
  [ostream]: #ostream
 
400
  [ostream.inserters.arithmetic]: #ostream.inserters.arithmetic
401
  [ostream.inserters.character]: #ostream.inserters.character
402
  [ostream.manip]: #ostream.manip
403
  [ostream.rvalue]: #ostream.rvalue
404
  [ostream.seeks]: #ostream.seeks
405
+ [ostream.syn]: #ostream.syn
406
  [ostream.unformatted]: #ostream.unformatted
407
  [ostream::sentry]: #ostream::sentry
408
  [ostringstream]: #ostringstream
409
  [ostringstream.assign]: #ostringstream.assign
410
  [ostringstream.cons]: #ostringstream.cons
411
  [ostringstream.members]: #ostringstream.members
412
  [output.streams]: #output.streams
413
  [quoted.manip]: #quoted.manip
414
  [res.on.data.races]: library.md#res.on.data.races
415
  [res.on.exception.handling]: library.md#res.on.exception.handling
416
+ [sstream.syn]: #sstream.syn
417
  [std.ios.manip]: #std.ios.manip
418
  [std.manip]: #std.manip
419
  [stream.buffers]: #stream.buffers
 
420
  [stream.types]: #stream.types
421
  [streambuf]: #streambuf
422
  [streambuf.assign]: #streambuf.assign
423
  [streambuf.buffer]: #streambuf.buffer
424
  [streambuf.cons]: #streambuf.cons
 
429
  [streambuf.pub.get]: #streambuf.pub.get
430
  [streambuf.pub.pback]: #streambuf.pub.pback
431
  [streambuf.pub.put]: #streambuf.pub.put
432
  [streambuf.put.area]: #streambuf.put.area
433
  [streambuf.reqts]: #streambuf.reqts
434
+ [streambuf.syn]: #streambuf.syn
435
  [streambuf.virt.buffer]: #streambuf.virt.buffer
436
  [streambuf.virt.get]: #streambuf.virt.get
437
  [streambuf.virt.locales]: #streambuf.virt.locales
438
  [streambuf.virt.pback]: #streambuf.virt.pback
439
  [streambuf.virt.put]: #streambuf.virt.put
440
  [streambuf.virtuals]: #streambuf.virtuals
441
  [string.classes]: strings.md#string.classes
442
  [string.streams]: #string.streams
 
443
  [stringbuf]: #stringbuf
444
  [stringbuf.assign]: #stringbuf.assign
445
  [stringbuf.cons]: #stringbuf.cons
446
  [stringbuf.members]: #stringbuf.members
447
  [stringbuf.virtuals]: #stringbuf.virtuals
448
  [strings]: strings.md#strings
449
  [stringstream]: #stringstream
450
  [stringstream.assign]: #stringstream.assign
451
  [stringstream.cons]: #stringstream.cons
452
  [stringstream.members]: #stringstream.members
453
+ [tab:enum.path.format]: #tab:enum.path.format
454
+ [tab:enum.perm_options]: #tab:enum.perm_options
455
+ [tab:filesystem_error.1]: #tab:filesystem_error.1
456
+ [tab:filesystem_error.2]: #tab:filesystem_error.2
457
+ [tab:filesystem_error.3]: #tab:filesystem_error.3
458
+ [tab:fs.enum.copy_options]: #tab:fs.enum.copy_options
459
+ [tab:fs.enum.directory_options]: #tab:fs.enum.directory_options
460
+ [tab:fs.enum.file_type]: #tab:fs.enum.file_type
461
+ [tab:fs.enum.perms]: #tab:fs.enum.perms
462
  [tab:iostreams.basicios.init.effects]: #tab:iostreams.basicios.init.effects
463
  [tab:iostreams.copyfmt.effects]: #tab:iostreams.copyfmt.effects
464
  [tab:iostreams.file.open.modes]: #tab:iostreams.file.open.modes
465
  [tab:iostreams.fmtflags.constants]: #tab:iostreams.fmtflags.constants
466
  [tab:iostreams.fmtflags.effects]: #tab:iostreams.fmtflags.effects
 
 
467
  [tab:iostreams.iostate.effects]: #tab:iostreams.iostate.effects
468
  [tab:iostreams.lib.summary]: #tab:iostreams.lib.summary
469
  [tab:iostreams.newoff.values]: #tab:iostreams.newoff.values
470
  [tab:iostreams.openmode.effects]: #tab:iostreams.openmode.effects
471
  [tab:iostreams.position.requirements]: #tab:iostreams.position.requirements
472
  [tab:iostreams.seekdir.effects]: #tab:iostreams.seekdir.effects
473
  [tab:iostreams.seekoff.effects]: #tab:iostreams.seekoff.effects
474
  [tab:iostreams.seekoff.positioning]: #tab:iostreams.seekoff.positioning
475
+ [temp.deduct]: temp.md#temp.deduct
476
+ [time.clock.req]: utilities.md#time.clock.req
477
  [wide.stream.objects]: #wide.stream.objects
478
 
479
  [^1]: It is the implementation’s responsibility to implement headers so
480
  that including `<iosfwd>` and other headers does not violate the
481
  rules about multiple occurrences of default arguments.
 
509
 
510
  [^9]: for example, because it cannot allocate space.
511
 
512
  [^10]: This suggests an infinite amount of copying, but the
513
  implementation can keep track of the maximum element of the arrays
514
+ that is nonzero.
515
 
516
  [^11]: Checking `badbit` also for `fail()` is historical practice.
517
 
518
  [^12]: The function signature `dec(ios_base&)` can be called by the
519
  function signature
 
525
  to assure that only objects for classes derived from this class may
526
  be constructed.
527
 
528
  [^14]: `underflow` or `uflow` might fail by throwing an exception
529
  prematurely. The intention is not only that the calls will not
530
+ return `eof()` but that they will return “immediately”.
531
 
532
  [^15]: Classes derived from `basic_streambuf` can provide more efficient
533
  ways to implement `xsgetn()` and `xsputn()` by overriding these
534
  definitions from the base class.
535
 
536
+ [^16]: That is, for each class derived from an instance of
537
+ `basic_streambuf` in this Clause ([[stringbuf]],
538
+ [[filebuf]]), a specification of how consuming a character
539
+ effects the associated output sequence is given. There is no
540
+ requirement on a program-defined class.
541
 
542
+ [^17]: Typically, `overflow` returns `c` to indicate success, except
543
+ when `traits::eq_int_type(c, traits::eof())` returns `true`, in
544
+ which case it returns `traits::not_eof(c)`.
545
+
546
+ [^18]: This will be possible only in functions that are part of the
547
  library. The semantics of the constructor used in user code is as
548
  specified.
549
 
550
+ [^19]: The sentry constructor and destructor can also perform additional
551
  implementation-dependent operations.
552
 
553
+ [^20]: This is done without causing an `ios::failure` to be thrown.
 
 
 
554
 
555
  [^21]: See, for example, the function signature
556
+ `ws(basic_istream&)` ([[istream.manip]]).
557
+
558
+ [^22]: See, for example, the function signature
559
  `dec(ios_base&)` ([[basefield.manip]]).
560
 
561
+ [^23]: This is done without causing an `ios::failure` to be thrown.
 
 
 
562
 
563
  [^24]: Note that this function is not overloaded on types `signed char`
564
  and `unsigned char`.
565
 
566
  [^25]: Note that this function is not overloaded on types `signed char`
567
  and `unsigned char`.
568
 
569
+ [^26]: Note that this function is not overloaded on types `signed char`
570
+ and `unsigned char`.
571
+
572
+ [^27]: Since the final input character is “extracted”, it is counted in
573
  the `gcount()`, even though it is not stored.
574
 
575
+ [^28]: This allows an input line which exactly fills the buffer, without
576
  setting `failbit`. This is different behavior than the historical
577
  AT&T implementation.
578
 
579
+ [^29]: This implies an empty input line will not cause `failbit` to be
580
  set.
581
 
582
+ [^30]: Note that this function is not overloaded on types `signed char`
583
  and `unsigned char`.
584
 
585
+ [^31]: The call `os.tie()->flush()` does not necessarily occur if the
586
  function can determine that no synchronization is necessary.
587
 
588
+ [^32]: The `sentry` constructor and destructor can also perform
589
  additional implementation-dependent operations.
590
 
591
+ [^33]: without causing an `ios::failure` to be thrown.
 
 
 
592
 
593
  [^34]: See, for example, the function signature
594
+ `endl(basic_ostream&)` ([[ostream.manip]]).
595
+
596
+ [^35]: See, for example, the function signature
597
  `dec(ios_base&)` ([[basefield.manip]]).
598
 
599
+ [^36]: without causing an `ios::failure` to be thrown.
 
 
 
600
 
601
  [^37]: Note that this function is not overloaded on types `signed char`
602
  and `unsigned char`.
603
 
604
+ [^38]: Note that this function is not overloaded on types `signed char`
605
+ and `unsigned char`.
606
+
607
+ [^39]: The expression `cin >> resetiosflags(ios_base::skipws)` clears
608
  `ios_base::skipws` in the format flags stored in the
609
  `basic_istream<charT, traits>` object `cin` (the same as
610
  `cin >> noskipws`), and the expression
611
  `cout << resetiosflags(ios_base::showbase)` clears
612
  `ios_base::showbase` in the format flags stored in the
613
  `basic_ostream<charT, traits>` object `cout` (the same as
614
  `cout << noshowbase`).
615
 
616
+ [^40]: The macro `SEEK_END` is defined, and the function signatures
617
  `fopen(const char*, const char*)` and `fseek(FILE*, long, int)` are
618
+ declared, in `<cstdio>` ([[cstdio.syn]]).
619
 
620
+ [^41]: POSIX® is a registered trademark of The IEEE. Windows® is a
621
+ registered trademark of Microsoft Corporation. This information is
622
+ given for the convenience of users of this document and does not
623
+ constitute an endorsement by ISO or IEC of these products.