From Jason Turner

[cinttypes.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp_re69or0/{from.md → to.md} +132 -73
tmp/tmp_re69or0/{from.md → to.md} RENAMED
@@ -4,19 +4,19 @@
4
  #include <cstdint> // see [cstdint.syn]
5
 
6
  namespace std {
7
  using imaxdiv_t = see below;
8
 
9
- intmax_t imaxabs(intmax_t j);
10
- imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
11
  intmax_t strtoimax(const char* nptr, char** endptr, int base);
12
  uintmax_t strtoumax(const char* nptr, char** endptr, int base);
13
  intmax_t wcstoimax(const wchar_t* nptr, wchar_t** endptr, int base);
14
  uintmax_t wcstoumax(const wchar_t* nptr, wchar_t** endptr, int base);
15
 
16
- intmax_t abs(intmax_t); // optional, see below
17
- imaxdiv_t div(intmax_t, intmax_t); // optional, see below
18
  }
19
 
20
  #define PRIdN see below
21
  #define PRIiN see below
22
  #define PRIoN see below
@@ -77,73 +77,97 @@ namespace std {
77
  The contents and meaning of the header `<cinttypes>` are the same as the
78
  C standard library header `<inttypes.h>`, with the following changes:
79
 
80
  - The header `<cinttypes>` includes the header `<cstdint>` instead of
81
  `<stdint.h>`, and
 
 
 
82
  - if and only if the type `intmax_t` designates an extended integer type
83
  [[basic.fundamental]], the following function signatures are added:
84
  ``` cpp
85
- intmax_t abs(intmax_t);
86
- imaxdiv_t div(intmax_t, intmax_t);
87
  ```
88
 
89
  which shall have the same semantics as the function signatures
90
- `intmax_t imaxabs(intmax_t)` and
91
- `imaxdiv_t imaxdiv(intmax_t, intmax_t)`, respectively.
92
 
93
  See also: ISO C 7.8
94
 
 
 
 
 
 
 
 
95
  <!-- Link reference definitions -->
96
  [adjustfield.manip]: #adjustfield.manip
 
97
  [basefield.manip]: #basefield.manip
98
  [basic.fundamental]: basic.md#basic.fundamental
99
  [basic.ios.cons]: #basic.ios.cons
100
  [basic.ios.copyfmt]: #basic.ios.copyfmt
101
  [basic.ios.members]: #basic.ios.members
 
102
  [basic.start.main]: basic.md#basic.start.main
103
  [bidirectional.iterators]: iterators.md#bidirectional.iterators
104
  [bitmask.types]: library.md#bitmask.types
105
  [c.files]: #c.files
106
  [char.traits]: strings.md#char.traits
 
 
107
  [cinttypes.syn]: #cinttypes.syn
108
  [container.requirements.general]: containers.md#container.requirements.general
109
- [cpp17.allocator]: #cpp17.allocator
110
  [cpp17.copyassignable]: #cpp17.copyassignable
111
  [cpp17.copyconstructible]: #cpp17.copyconstructible
112
  [cpp17.defaultconstructible]: #cpp17.defaultconstructible
113
  [cpp17.destructible]: #cpp17.destructible
114
  [cpp17.equalitycomparable]: #cpp17.equalitycomparable
 
115
  [cstdio.syn]: #cstdio.syn
116
- [defns.ntcts]: library.md#defns.ntcts
117
  [enumerated.types]: library.md#enumerated.types
118
  [error.reporting]: #error.reporting
119
  [ext.manip]: #ext.manip
120
  [file.streams]: #file.streams
121
  [filebuf]: #filebuf
122
  [filebuf.assign]: #filebuf.assign
123
  [filebuf.cons]: #filebuf.cons
 
124
  [filebuf.members]: #filebuf.members
125
  [filebuf.open.modes]: #filebuf.open.modes
126
  [filebuf.seekoff]: #filebuf.seekoff
127
  [filebuf.virtuals]: #filebuf.virtuals
128
  [filesystems]: #filesystems
129
  [floatfield.manip]: #floatfield.manip
130
  [fmtflags.manip]: #fmtflags.manip
131
  [fmtflags.state]: #fmtflags.state
 
132
  [fpos]: #fpos
133
  [fpos.members]: #fpos.members
134
  [fpos.operations]: #fpos.operations
135
  [fs.class.directory.entry]: #fs.class.directory.entry
 
136
  [fs.class.directory.iterator]: #fs.class.directory.iterator
 
137
  [fs.class.file.status]: #fs.class.file.status
 
138
  [fs.class.filesystem.error]: #fs.class.filesystem.error
 
139
  [fs.class.path]: #fs.class.path
 
140
  [fs.class.rec.dir.itr]: #fs.class.rec.dir.itr
 
141
  [fs.conform.9945]: #fs.conform.9945
142
  [fs.conform.os]: #fs.conform.os
143
  [fs.conformance]: #fs.conformance
 
144
  [fs.dir.entry.cons]: #fs.dir.entry.cons
 
145
  [fs.dir.entry.mods]: #fs.dir.entry.mods
146
  [fs.dir.entry.obs]: #fs.dir.entry.obs
147
  [fs.dir.itr.members]: #fs.dir.itr.members
148
  [fs.dir.itr.nonmembers]: #fs.dir.itr.nonmembers
149
  [fs.enum]: #fs.enum
@@ -158,11 +182,10 @@ See also: ISO C 7.8
158
  [fs.file.status.mods]: #fs.file.status.mods
159
  [fs.file.status.obs]: #fs.file.status.obs
160
  [fs.filesystem.error.members]: #fs.filesystem.error.members
161
  [fs.filesystem.syn]: #fs.filesystem.syn
162
  [fs.general]: #fs.general
163
- [fs.norm.ref]: #fs.norm.ref
164
  [fs.op.absolute]: #fs.op.absolute
165
  [fs.op.canonical]: #fs.op.canonical
166
  [fs.op.copy]: #fs.op.copy
167
  [fs.op.copy.file]: #fs.op.copy.file
168
  [fs.op.copy.symlink]: #fs.op.copy.symlink
@@ -174,10 +197,11 @@ See also: ISO C 7.8
174
  [fs.op.current.path]: #fs.op.current.path
175
  [fs.op.equivalent]: #fs.op.equivalent
176
  [fs.op.exists]: #fs.op.exists
177
  [fs.op.file.size]: #fs.op.file.size
178
  [fs.op.funcs]: #fs.op.funcs
 
179
  [fs.op.hard.lk.ct]: #fs.op.hard.lk.ct
180
  [fs.op.is.block.file]: #fs.op.is.block.file
181
  [fs.op.is.char.file]: #fs.op.is.char.file
182
  [fs.op.is.directory]: #fs.op.is.directory
183
  [fs.op.is.empty]: #fs.op.is.empty
@@ -210,10 +234,11 @@ See also: ISO C 7.8
210
  [fs.path.decompose]: #fs.path.decompose
211
  [fs.path.fmt.cvt]: #fs.path.fmt.cvt
212
  [fs.path.gen]: #fs.path.gen
213
  [fs.path.generic]: #fs.path.generic
214
  [fs.path.generic.obs]: #fs.path.generic.obs
 
215
  [fs.path.io]: #fs.path.io
216
  [fs.path.itr]: #fs.path.itr
217
  [fs.path.member]: #fs.path.member
218
  [fs.path.modifiers]: #fs.path.modifiers
219
  [fs.path.native.obs]: #fs.path.native.obs
@@ -223,31 +248,34 @@ See also: ISO C 7.8
223
  [fs.path.type.cvt]: #fs.path.type.cvt
224
  [fs.race.behavior]: #fs.race.behavior
225
  [fs.rec.dir.itr.members]: #fs.rec.dir.itr.members
226
  [fs.rec.dir.itr.nonmembers]: #fs.rec.dir.itr.nonmembers
227
  [fs.req]: #fs.req
228
- [fs.req.namespace]: #fs.req.namespace
229
  [fstream]: #fstream
230
- [fstream.assign]: #fstream.assign
231
  [fstream.cons]: #fstream.cons
 
232
  [fstream.members]: #fstream.members
 
233
  [fstream.syn]: #fstream.syn
234
  [ifstream]: #ifstream
235
- [ifstream.assign]: #ifstream.assign
236
  [ifstream.cons]: #ifstream.cons
 
237
  [ifstream.members]: #ifstream.members
 
238
  [input.iterators]: iterators.md#input.iterators
239
  [input.output]: #input.output
240
  [input.output.general]: #input.output.general
241
  [input.streams]: #input.streams
 
242
  [intro.multithread]: basic.md#intro.multithread
243
  [intro.races]: basic.md#intro.races
244
  [iomanip.syn]: #iomanip.syn
245
  [ios]: #ios
246
  [ios.base]: #ios.base
247
  [ios.base.callback]: #ios.base.callback
248
  [ios.base.cons]: #ios.base.cons
 
249
  [ios.base.locales]: #ios.base.locales
250
  [ios.base.storage]: #ios.base.storage
251
  [ios.failure]: #ios.failure
252
  [ios.fmtflags]: #ios.fmtflags
253
  [ios.fmtflags.const]: #ios.fmtflags.const
@@ -270,72 +298,108 @@ See also: ISO C 7.8
270
  [iostream.limits.imbue]: #iostream.limits.imbue
271
  [iostream.objects]: #iostream.objects
272
  [iostream.objects.overview]: #iostream.objects.overview
273
  [iostream.syn]: #iostream.syn
274
  [iostreamclass]: #iostreamclass
 
275
  [iostreams.base]: #iostreams.base
276
  [iostreams.limits.pos]: #iostreams.limits.pos
277
  [iostreams.requirements]: #iostreams.requirements
278
  [iostreams.summary]: #iostreams.summary
279
  [iostreams.threadsafety]: #iostreams.threadsafety
 
 
 
 
 
280
  [istream]: #istream
281
  [istream.assign]: #istream.assign
282
  [istream.cons]: #istream.cons
283
  [istream.extractors]: #istream.extractors
284
  [istream.formatted]: #istream.formatted
285
  [istream.formatted.arithmetic]: #istream.formatted.arithmetic
286
  [istream.formatted.reqmts]: #istream.formatted.reqmts
 
287
  [istream.manip]: #istream.manip
288
  [istream.rvalue]: #istream.rvalue
289
  [istream.sentry]: #istream.sentry
290
  [istream.syn]: #istream.syn
291
  [istream.unformatted]: #istream.unformatted
292
  [istringstream]: #istringstream
293
- [istringstream.assign]: #istringstream.assign
294
  [istringstream.cons]: #istringstream.cons
 
295
  [istringstream.members]: #istringstream.members
 
296
  [lex.charset]: lex.md#lex.charset
297
  [locale.codecvt.virtuals]: localization.md#locale.codecvt.virtuals
298
  [locale.num.get]: localization.md#locale.num.get
299
  [namespace.std]: library.md#namespace.std
300
  [narrow.stream.objects]: #narrow.stream.objects
301
  [numeric.limits]: support.md#numeric.limits
302
  [ofstream]: #ofstream
303
- [ofstream.assign]: #ofstream.assign
304
  [ofstream.cons]: #ofstream.cons
 
305
  [ofstream.members]: #ofstream.members
 
 
 
 
 
 
306
  [ostream]: #ostream
307
  [ostream.assign]: #ostream.assign
308
  [ostream.cons]: #ostream.cons
309
  [ostream.formatted]: #ostream.formatted
 
310
  [ostream.formatted.reqmts]: #ostream.formatted.reqmts
 
311
  [ostream.inserters]: #ostream.inserters
312
  [ostream.inserters.arithmetic]: #ostream.inserters.arithmetic
313
  [ostream.inserters.character]: #ostream.inserters.character
314
  [ostream.manip]: #ostream.manip
315
  [ostream.rvalue]: #ostream.rvalue
316
  [ostream.seeks]: #ostream.seeks
317
  [ostream.sentry]: #ostream.sentry
318
  [ostream.syn]: #ostream.syn
319
  [ostream.unformatted]: #ostream.unformatted
320
  [ostringstream]: #ostringstream
321
- [ostringstream.assign]: #ostringstream.assign
322
  [ostringstream.cons]: #ostringstream.cons
 
323
  [ostringstream.members]: #ostringstream.members
 
324
  [output.streams]: #output.streams
 
 
 
325
  [quoted.manip]: #quoted.manip
326
  [res.on.data.races]: library.md#res.on.data.races
327
  [res.on.exception.handling]: library.md#res.on.exception.handling
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  [sstream.syn]: #sstream.syn
329
  [std.ios.manip]: #std.ios.manip
330
  [std.manip]: #std.manip
 
331
  [stream.buffers]: #stream.buffers
332
  [stream.types]: #stream.types
333
  [streambuf]: #streambuf
334
  [streambuf.assign]: #streambuf.assign
335
  [streambuf.buffer]: #streambuf.buffer
336
  [streambuf.cons]: #streambuf.cons
 
337
  [streambuf.get.area]: #streambuf.get.area
338
  [streambuf.locales]: #streambuf.locales
339
  [streambuf.members]: #streambuf.members
340
  [streambuf.protected]: #streambuf.protected
341
  [streambuf.pub.get]: #streambuf.pub.get
@@ -353,19 +417,21 @@ See also: ISO C 7.8
353
  [string.classes]: strings.md#string.classes
354
  [string.streams]: #string.streams
355
  [stringbuf]: #stringbuf
356
  [stringbuf.assign]: #stringbuf.assign
357
  [stringbuf.cons]: #stringbuf.cons
 
358
  [stringbuf.members]: #stringbuf.members
359
  [stringbuf.seekoff.newoff]: #stringbuf.seekoff.newoff
360
  [stringbuf.seekoff.pos]: #stringbuf.seekoff.pos
361
  [stringbuf.virtuals]: #stringbuf.virtuals
362
  [strings]: strings.md#strings
363
  [stringstream]: #stringstream
364
- [stringstream.assign]: #stringstream.assign
365
  [stringstream.cons]: #stringstream.cons
 
366
  [stringstream.members]: #stringstream.members
 
367
  [syncstream]: #syncstream
368
  [syncstream.osyncstream]: #syncstream.osyncstream
369
  [syncstream.osyncstream.cons]: #syncstream.osyncstream.cons
370
  [syncstream.osyncstream.members]: #syncstream.osyncstream.members
371
  [syncstream.osyncstream.overview]: #syncstream.osyncstream.overview
@@ -376,71 +442,73 @@ See also: ISO C 7.8
376
  [syncstream.syncbuf.members]: #syncstream.syncbuf.members
377
  [syncstream.syncbuf.overview]: #syncstream.syncbuf.overview
378
  [syncstream.syncbuf.special]: #syncstream.syncbuf.special
379
  [syncstream.syncbuf.virtuals]: #syncstream.syncbuf.virtuals
380
  [temp.deduct]: temp.md#temp.deduct
 
 
381
  [wide.stream.objects]: #wide.stream.objects
382
 
383
- [^1]: It is the implementation’s responsibility to implement headers so
 
 
 
 
 
384
  that including `<iosfwd>` and other headers does not violate the
385
  rules about multiple occurrences of default arguments.
386
 
387
- [^2]: If it is possible for them to do so, implementations should
388
- initialize the objects earlier than required.
389
-
390
- [^3]: Constructors and destructors for objects with static storage
391
  duration can access these objects to read input from `stdin` or
392
  write output to `stdout` or `stderr`.
393
 
394
- [^4]: Typically `long long`.
395
-
396
- [^5]: `streamsize` is used in most places where ISO C would use
397
- `size_t`.
398
-
399
- [^6]: This implies that operations on a standard iostream object can be
400
  mixed arbitrarily with operations on the corresponding stdio stream.
401
  In practical terms, synchronization usually means that a standard
402
  iostream object and a standard stdio object share a buffer.
403
 
404
- [^7]: An implementation is free to implement both the integer array
405
  pointed at by `iarray` and the pointer array pointed at by `parray`
406
  as sparse data structures, possibly with a one-element cache for
407
  each.
408
 
 
 
409
  [^8]: For example, because it cannot allocate space.
410
 
411
- [^9]: For example, because it cannot allocate space.
412
-
413
- [^10]: This suggests an infinite amount of copying, but the
414
  implementation can keep track of the maximum element of the arrays
415
  that is nonzero.
416
 
417
- [^11]: Checking `badbit` also for `fail()` is historical practice.
418
 
419
- [^12]: The function signature `dec(ios_base&)` can be called by the
420
  function signature
421
  `basic_ostream& stream::operator<<(ios_base& (*)(ios_base&))` to
422
  permit expressions of the form `cout << dec` to change the format
423
  flags stored in `cout`.
424
 
425
- [^13]: The default constructor is protected for class `basic_streambuf`
426
- to assure that only objects for classes derived from this class may
427
  be constructed.
428
 
429
- [^14]: `underflow` or `uflow` might fail by throwing an exception
 
 
 
430
  prematurely. The intention is not only that the calls will not
431
  return `eof()` but that they will return “immediately”.
432
 
433
  [^15]: Classes derived from `basic_streambuf` can provide more efficient
434
  ways to implement `xsgetn()` and `xsputn()` by overriding these
435
  definitions from the base class.
436
 
437
- [^16]: That is, for each class derived from an instance of
438
- `basic_streambuf` in this Clause ([[stringbuf]],
439
- [[filebuf]]), a specification of how consuming a character
440
- effects the associated output sequence is given. There is no
441
- requirement on a program-defined class.
442
 
443
  [^17]: Typically, `overflow` returns `c` to indicate success, except
444
  when `traits::eq_int_type(c, traits::eof())` returns `true`, in
445
  which case it returns `traits::not_eof(c)`.
446
 
@@ -449,76 +517,67 @@ See also: ISO C 7.8
449
  specified.
450
 
451
  [^19]: The `sentry` constructor and destructor can also perform
452
  additional implementation-dependent operations.
453
 
454
- [^20]: This is done without causing an `ios_base::failure` to be thrown.
455
-
456
- [^21]: See, for example, the function signature
457
  `ws(basic_istream&)`[[istream.manip]].
458
 
459
- [^22]: See, for example, the function signature
460
  `dec(ios_base&)`[[basefield.manip]].
461
 
462
- [^23]: This is done without causing an `ios_base::failure` to be thrown.
 
 
 
 
463
 
464
  [^24]: Note that this function is not overloaded on types `signed char`
465
  and `unsigned char`.
466
 
467
- [^25]: Note that this function is not overloaded on types `signed char`
468
- and `unsigned char`.
469
-
470
- [^26]: Note that this function is not overloaded on types `signed char`
471
- and `unsigned char`.
472
-
473
- [^27]: Since the final input character is “extracted”, it is counted in
474
  the `gcount()`, even though it is not stored.
475
 
476
- [^28]: This allows an input line which exactly fills the buffer, without
477
  setting `failbit`. This is different behavior than the historical
478
  AT&T implementation.
479
 
480
- [^29]: This implies an empty input line will not cause `failbit` to be
481
  set.
482
 
483
- [^30]: Note that this function is not overloaded on types `signed char`
484
  and `unsigned char`.
485
 
486
- [^31]: The call `os.tie()->flush()` does not necessarily occur if the
487
  function can determine that no synchronization is necessary.
488
 
489
- [^32]: The `sentry` constructor and destructor can also perform
490
  additional implementation-dependent operations.
491
 
492
- [^33]: without causing an `ios_base::failure` to be thrown.
493
 
494
- [^34]: See, for example, the function signature
495
  `endl(basic_ostream&)`[[ostream.manip]].
496
 
497
- [^35]: See, for example, the function signature
498
  `dec(ios_base&)`[[basefield.manip]].
499
 
500
- [^36]: without causing an `ios_base::failure` to be thrown.
501
 
502
- [^37]: Note that this function is not overloaded on types `signed char`
503
  and `unsigned char`.
504
 
505
- [^38]: Note that this function is not overloaded on types `signed char`
506
  and `unsigned char`.
507
 
508
- [^39]: The expression `cin >> resetiosflags(ios_base::skipws)` clears
509
  `ios_base::skipws` in the format flags stored in the
510
  `basic_istream<charT, traits>` object `cin` (the same as
511
  `cin >> noskipws`), and the expression
512
  `cout << resetiosflags(ios_base::showbase)` clears
513
  `ios_base::showbase` in the format flags stored in the
514
  `basic_ostream<charT, traits>` object `cout` (the same as
515
  `cout << noshowbase`).
516
 
517
- [^40]: The macro `SEEK_END` is defined, and the function signatures
518
  `fopen(const char*, const char*)` and `fseek(FILE*, long, int)` are
519
  declared, in `<cstdio>`.
520
-
521
- [^41]: POSIX® is a registered trademark of The IEEE. Windows® is a
522
- registered trademark of Microsoft Corporation. This information is
523
- given for the convenience of users of this document and does not
524
- constitute an endorsement by ISO or IEC of these products.
 
4
  #include <cstdint> // see [cstdint.syn]
5
 
6
  namespace std {
7
  using imaxdiv_t = see below;
8
 
9
+ constexpr intmax_t imaxabs(intmax_t j);
10
+ constexpr imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
11
  intmax_t strtoimax(const char* nptr, char** endptr, int base);
12
  uintmax_t strtoumax(const char* nptr, char** endptr, int base);
13
  intmax_t wcstoimax(const wchar_t* nptr, wchar_t** endptr, int base);
14
  uintmax_t wcstoumax(const wchar_t* nptr, wchar_t** endptr, int base);
15
 
16
+ constexpr intmax_t abs(intmax_t); // optional, see below
17
+ constexpr imaxdiv_t div(intmax_t, intmax_t); // optional, see below
18
  }
19
 
20
  #define PRIdN see below
21
  #define PRIiN see below
22
  #define PRIoN see below
 
77
  The contents and meaning of the header `<cinttypes>` are the same as the
78
  C standard library header `<inttypes.h>`, with the following changes:
79
 
80
  - The header `<cinttypes>` includes the header `<cstdint>` instead of
81
  `<stdint.h>`, and
82
+ - `intmax_t` and `uintmax_t` are not required to be able to represent
83
+ all values of extended integer types wider than `long long` and
84
+ `unsigned long long`, respectively, and
85
  - if and only if the type `intmax_t` designates an extended integer type
86
  [[basic.fundamental]], the following function signatures are added:
87
  ``` cpp
88
+ constexpr intmax_t abs(intmax_t);
89
+ constexpr imaxdiv_t div(intmax_t, intmax_t);
90
  ```
91
 
92
  which shall have the same semantics as the function signatures
93
+ `constexpr intmax_t imaxabs(intmax_t)` and
94
+ `constexpr imaxdiv_t imaxdiv(intmax_t, intmax_t)`, respectively.
95
 
96
  See also: ISO C 7.8
97
 
98
+ Each of the `PRI` macros listed in this subclause is defined if and only
99
+ if the implementation defines the corresponding *typedef-name* in 
100
+ [[cstdint.syn]]. Each of the `SCN` macros listed in this subclause is
101
+ defined if and only if the implementation defines the corresponding
102
+ *typedef-name* in  [[cstdint.syn]] and has a suitable `fscanf` length
103
+ modifier for the type.
104
+
105
  <!-- Link reference definitions -->
106
  [adjustfield.manip]: #adjustfield.manip
107
+ [allocator.requirements.general]: library.md#allocator.requirements.general
108
  [basefield.manip]: #basefield.manip
109
  [basic.fundamental]: basic.md#basic.fundamental
110
  [basic.ios.cons]: #basic.ios.cons
111
  [basic.ios.copyfmt]: #basic.ios.copyfmt
112
  [basic.ios.members]: #basic.ios.members
113
+ [basic.start.dynamic]: basic.md#basic.start.dynamic
114
  [basic.start.main]: basic.md#basic.start.main
115
  [bidirectional.iterators]: iterators.md#bidirectional.iterators
116
  [bitmask.types]: library.md#bitmask.types
117
  [c.files]: #c.files
118
  [char.traits]: strings.md#char.traits
119
+ [char.traits.specializations]: strings.md#char.traits.specializations
120
+ [character.seq]: library.md#character.seq
121
  [cinttypes.syn]: #cinttypes.syn
122
  [container.requirements.general]: containers.md#container.requirements.general
 
123
  [cpp17.copyassignable]: #cpp17.copyassignable
124
  [cpp17.copyconstructible]: #cpp17.copyconstructible
125
  [cpp17.defaultconstructible]: #cpp17.defaultconstructible
126
  [cpp17.destructible]: #cpp17.destructible
127
  [cpp17.equalitycomparable]: #cpp17.equalitycomparable
128
+ [cstdint.syn]: support.md#cstdint.syn
129
  [cstdio.syn]: #cstdio.syn
130
+ [defns.ntcts]: intro.md#defns.ntcts
131
  [enumerated.types]: library.md#enumerated.types
132
  [error.reporting]: #error.reporting
133
  [ext.manip]: #ext.manip
134
  [file.streams]: #file.streams
135
  [filebuf]: #filebuf
136
  [filebuf.assign]: #filebuf.assign
137
  [filebuf.cons]: #filebuf.cons
138
+ [filebuf.general]: #filebuf.general
139
  [filebuf.members]: #filebuf.members
140
  [filebuf.open.modes]: #filebuf.open.modes
141
  [filebuf.seekoff]: #filebuf.seekoff
142
  [filebuf.virtuals]: #filebuf.virtuals
143
  [filesystems]: #filesystems
144
  [floatfield.manip]: #floatfield.manip
145
  [fmtflags.manip]: #fmtflags.manip
146
  [fmtflags.state]: #fmtflags.state
147
+ [format.err.report]: utilities.md#format.err.report
148
  [fpos]: #fpos
149
  [fpos.members]: #fpos.members
150
  [fpos.operations]: #fpos.operations
151
  [fs.class.directory.entry]: #fs.class.directory.entry
152
+ [fs.class.directory.entry.general]: #fs.class.directory.entry.general
153
  [fs.class.directory.iterator]: #fs.class.directory.iterator
154
+ [fs.class.directory.iterator.general]: #fs.class.directory.iterator.general
155
  [fs.class.file.status]: #fs.class.file.status
156
+ [fs.class.file.status.general]: #fs.class.file.status.general
157
  [fs.class.filesystem.error]: #fs.class.filesystem.error
158
+ [fs.class.filesystem.error.general]: #fs.class.filesystem.error.general
159
  [fs.class.path]: #fs.class.path
160
+ [fs.class.path.general]: #fs.class.path.general
161
  [fs.class.rec.dir.itr]: #fs.class.rec.dir.itr
162
+ [fs.class.rec.dir.itr.general]: #fs.class.rec.dir.itr.general
163
  [fs.conform.9945]: #fs.conform.9945
164
  [fs.conform.os]: #fs.conform.os
165
  [fs.conformance]: #fs.conformance
166
+ [fs.conformance.general]: #fs.conformance.general
167
  [fs.dir.entry.cons]: #fs.dir.entry.cons
168
+ [fs.dir.entry.io]: #fs.dir.entry.io
169
  [fs.dir.entry.mods]: #fs.dir.entry.mods
170
  [fs.dir.entry.obs]: #fs.dir.entry.obs
171
  [fs.dir.itr.members]: #fs.dir.itr.members
172
  [fs.dir.itr.nonmembers]: #fs.dir.itr.nonmembers
173
  [fs.enum]: #fs.enum
 
182
  [fs.file.status.mods]: #fs.file.status.mods
183
  [fs.file.status.obs]: #fs.file.status.obs
184
  [fs.filesystem.error.members]: #fs.filesystem.error.members
185
  [fs.filesystem.syn]: #fs.filesystem.syn
186
  [fs.general]: #fs.general
 
187
  [fs.op.absolute]: #fs.op.absolute
188
  [fs.op.canonical]: #fs.op.canonical
189
  [fs.op.copy]: #fs.op.copy
190
  [fs.op.copy.file]: #fs.op.copy.file
191
  [fs.op.copy.symlink]: #fs.op.copy.symlink
 
197
  [fs.op.current.path]: #fs.op.current.path
198
  [fs.op.equivalent]: #fs.op.equivalent
199
  [fs.op.exists]: #fs.op.exists
200
  [fs.op.file.size]: #fs.op.file.size
201
  [fs.op.funcs]: #fs.op.funcs
202
+ [fs.op.funcs.general]: #fs.op.funcs.general
203
  [fs.op.hard.lk.ct]: #fs.op.hard.lk.ct
204
  [fs.op.is.block.file]: #fs.op.is.block.file
205
  [fs.op.is.char.file]: #fs.op.is.char.file
206
  [fs.op.is.directory]: #fs.op.is.directory
207
  [fs.op.is.empty]: #fs.op.is.empty
 
234
  [fs.path.decompose]: #fs.path.decompose
235
  [fs.path.fmt.cvt]: #fs.path.fmt.cvt
236
  [fs.path.gen]: #fs.path.gen
237
  [fs.path.generic]: #fs.path.generic
238
  [fs.path.generic.obs]: #fs.path.generic.obs
239
+ [fs.path.hash]: #fs.path.hash
240
  [fs.path.io]: #fs.path.io
241
  [fs.path.itr]: #fs.path.itr
242
  [fs.path.member]: #fs.path.member
243
  [fs.path.modifiers]: #fs.path.modifiers
244
  [fs.path.native.obs]: #fs.path.native.obs
 
248
  [fs.path.type.cvt]: #fs.path.type.cvt
249
  [fs.race.behavior]: #fs.race.behavior
250
  [fs.rec.dir.itr.members]: #fs.rec.dir.itr.members
251
  [fs.rec.dir.itr.nonmembers]: #fs.rec.dir.itr.nonmembers
252
  [fs.req]: #fs.req
 
253
  [fstream]: #fstream
 
254
  [fstream.cons]: #fstream.cons
255
+ [fstream.general]: #fstream.general
256
  [fstream.members]: #fstream.members
257
+ [fstream.swap]: #fstream.swap
258
  [fstream.syn]: #fstream.syn
259
  [ifstream]: #ifstream
 
260
  [ifstream.cons]: #ifstream.cons
261
+ [ifstream.general]: #ifstream.general
262
  [ifstream.members]: #ifstream.members
263
+ [ifstream.swap]: #ifstream.swap
264
  [input.iterators]: iterators.md#input.iterators
265
  [input.output]: #input.output
266
  [input.output.general]: #input.output.general
267
  [input.streams]: #input.streams
268
+ [input.streams.general]: #input.streams.general
269
  [intro.multithread]: basic.md#intro.multithread
270
  [intro.races]: basic.md#intro.races
271
  [iomanip.syn]: #iomanip.syn
272
  [ios]: #ios
273
  [ios.base]: #ios.base
274
  [ios.base.callback]: #ios.base.callback
275
  [ios.base.cons]: #ios.base.cons
276
+ [ios.base.general]: #ios.base.general
277
  [ios.base.locales]: #ios.base.locales
278
  [ios.base.storage]: #ios.base.storage
279
  [ios.failure]: #ios.failure
280
  [ios.fmtflags]: #ios.fmtflags
281
  [ios.fmtflags.const]: #ios.fmtflags.const
 
298
  [iostream.limits.imbue]: #iostream.limits.imbue
299
  [iostream.objects]: #iostream.objects
300
  [iostream.objects.overview]: #iostream.objects.overview
301
  [iostream.syn]: #iostream.syn
302
  [iostreamclass]: #iostreamclass
303
+ [iostreamclass.general]: #iostreamclass.general
304
  [iostreams.base]: #iostreams.base
305
  [iostreams.limits.pos]: #iostreams.limits.pos
306
  [iostreams.requirements]: #iostreams.requirements
307
  [iostreams.summary]: #iostreams.summary
308
  [iostreams.threadsafety]: #iostreams.threadsafety
309
+ [ispanstream]: #ispanstream
310
+ [ispanstream.cons]: #ispanstream.cons
311
+ [ispanstream.general]: #ispanstream.general
312
+ [ispanstream.members]: #ispanstream.members
313
+ [ispanstream.swap]: #ispanstream.swap
314
  [istream]: #istream
315
  [istream.assign]: #istream.assign
316
  [istream.cons]: #istream.cons
317
  [istream.extractors]: #istream.extractors
318
  [istream.formatted]: #istream.formatted
319
  [istream.formatted.arithmetic]: #istream.formatted.arithmetic
320
  [istream.formatted.reqmts]: #istream.formatted.reqmts
321
+ [istream.general]: #istream.general
322
  [istream.manip]: #istream.manip
323
  [istream.rvalue]: #istream.rvalue
324
  [istream.sentry]: #istream.sentry
325
  [istream.syn]: #istream.syn
326
  [istream.unformatted]: #istream.unformatted
327
  [istringstream]: #istringstream
 
328
  [istringstream.cons]: #istringstream.cons
329
+ [istringstream.general]: #istringstream.general
330
  [istringstream.members]: #istringstream.members
331
+ [istringstream.swap]: #istringstream.swap
332
  [lex.charset]: lex.md#lex.charset
333
  [locale.codecvt.virtuals]: localization.md#locale.codecvt.virtuals
334
  [locale.num.get]: localization.md#locale.num.get
335
  [namespace.std]: library.md#namespace.std
336
  [narrow.stream.objects]: #narrow.stream.objects
337
  [numeric.limits]: support.md#numeric.limits
338
  [ofstream]: #ofstream
 
339
  [ofstream.cons]: #ofstream.cons
340
+ [ofstream.general]: #ofstream.general
341
  [ofstream.members]: #ofstream.members
342
+ [ofstream.swap]: #ofstream.swap
343
+ [ospanstream]: #ospanstream
344
+ [ospanstream.cons]: #ospanstream.cons
345
+ [ospanstream.general]: #ospanstream.general
346
+ [ospanstream.members]: #ospanstream.members
347
+ [ospanstream.swap]: #ospanstream.swap
348
  [ostream]: #ostream
349
  [ostream.assign]: #ostream.assign
350
  [ostream.cons]: #ostream.cons
351
  [ostream.formatted]: #ostream.formatted
352
+ [ostream.formatted.print]: #ostream.formatted.print
353
  [ostream.formatted.reqmts]: #ostream.formatted.reqmts
354
+ [ostream.general]: #ostream.general
355
  [ostream.inserters]: #ostream.inserters
356
  [ostream.inserters.arithmetic]: #ostream.inserters.arithmetic
357
  [ostream.inserters.character]: #ostream.inserters.character
358
  [ostream.manip]: #ostream.manip
359
  [ostream.rvalue]: #ostream.rvalue
360
  [ostream.seeks]: #ostream.seeks
361
  [ostream.sentry]: #ostream.sentry
362
  [ostream.syn]: #ostream.syn
363
  [ostream.unformatted]: #ostream.unformatted
364
  [ostringstream]: #ostringstream
 
365
  [ostringstream.cons]: #ostringstream.cons
366
+ [ostringstream.general]: #ostringstream.general
367
  [ostringstream.members]: #ostringstream.members
368
+ [ostringstream.swap]: #ostringstream.swap
369
  [output.streams]: #output.streams
370
+ [output.streams.general]: #output.streams.general
371
+ [print.fun]: #print.fun
372
+ [print.syn]: #print.syn
373
  [quoted.manip]: #quoted.manip
374
  [res.on.data.races]: library.md#res.on.data.races
375
  [res.on.exception.handling]: library.md#res.on.exception.handling
376
+ [span.streams]: #span.streams
377
+ [span.streams.overview]: #span.streams.overview
378
+ [spanbuf]: #spanbuf
379
+ [spanbuf.assign]: #spanbuf.assign
380
+ [spanbuf.cons]: #spanbuf.cons
381
+ [spanbuf.general]: #spanbuf.general
382
+ [spanbuf.members]: #spanbuf.members
383
+ [spanbuf.virtuals]: #spanbuf.virtuals
384
+ [spanstream]: #spanstream
385
+ [spanstream.cons]: #spanstream.cons
386
+ [spanstream.general]: #spanstream.general
387
+ [spanstream.members]: #spanstream.members
388
+ [spanstream.swap]: #spanstream.swap
389
+ [spanstream.syn]: #spanstream.syn
390
  [sstream.syn]: #sstream.syn
391
  [std.ios.manip]: #std.ios.manip
392
  [std.manip]: #std.manip
393
+ [std.modules]: library.md#std.modules
394
  [stream.buffers]: #stream.buffers
395
  [stream.types]: #stream.types
396
  [streambuf]: #streambuf
397
  [streambuf.assign]: #streambuf.assign
398
  [streambuf.buffer]: #streambuf.buffer
399
  [streambuf.cons]: #streambuf.cons
400
+ [streambuf.general]: #streambuf.general
401
  [streambuf.get.area]: #streambuf.get.area
402
  [streambuf.locales]: #streambuf.locales
403
  [streambuf.members]: #streambuf.members
404
  [streambuf.protected]: #streambuf.protected
405
  [streambuf.pub.get]: #streambuf.pub.get
 
417
  [string.classes]: strings.md#string.classes
418
  [string.streams]: #string.streams
419
  [stringbuf]: #stringbuf
420
  [stringbuf.assign]: #stringbuf.assign
421
  [stringbuf.cons]: #stringbuf.cons
422
+ [stringbuf.general]: #stringbuf.general
423
  [stringbuf.members]: #stringbuf.members
424
  [stringbuf.seekoff.newoff]: #stringbuf.seekoff.newoff
425
  [stringbuf.seekoff.pos]: #stringbuf.seekoff.pos
426
  [stringbuf.virtuals]: #stringbuf.virtuals
427
  [strings]: strings.md#strings
428
  [stringstream]: #stringstream
 
429
  [stringstream.cons]: #stringstream.cons
430
+ [stringstream.general]: #stringstream.general
431
  [stringstream.members]: #stringstream.members
432
+ [stringstream.swap]: #stringstream.swap
433
  [syncstream]: #syncstream
434
  [syncstream.osyncstream]: #syncstream.osyncstream
435
  [syncstream.osyncstream.cons]: #syncstream.osyncstream.cons
436
  [syncstream.osyncstream.members]: #syncstream.osyncstream.members
437
  [syncstream.osyncstream.overview]: #syncstream.osyncstream.overview
 
442
  [syncstream.syncbuf.members]: #syncstream.syncbuf.members
443
  [syncstream.syncbuf.overview]: #syncstream.syncbuf.overview
444
  [syncstream.syncbuf.special]: #syncstream.syncbuf.special
445
  [syncstream.syncbuf.virtuals]: #syncstream.syncbuf.virtuals
446
  [temp.deduct]: temp.md#temp.deduct
447
+ [term.unevaluated.operand]: expr.md#term.unevaluated.operand
448
+ [views.span]: containers.md#views.span
449
  [wide.stream.objects]: #wide.stream.objects
450
 
451
+ [^1]: Typically `long long`.
452
+
453
+ [^2]: Most places where `streamsize` is used would use `size_t` in ISO
454
+ C, or `ssize_t` in POSIX.
455
+
456
+ [^3]: It is the implementation’s responsibility to implement headers so
457
  that including `<iosfwd>` and other headers does not violate the
458
  rules about multiple occurrences of default arguments.
459
 
460
+ [^4]: Constructors and destructors for objects with static storage
 
 
 
461
  duration can access these objects to read input from `stdin` or
462
  write output to `stdout` or `stderr`.
463
 
464
+ [^5]: This implies that operations on a standard iostream object can be
 
 
 
 
 
465
  mixed arbitrarily with operations on the corresponding stdio stream.
466
  In practical terms, synchronization usually means that a standard
467
  iostream object and a standard stdio object share a buffer.
468
 
469
+ [^6]: An implementation is free to implement both the integer array
470
  pointed at by `iarray` and the pointer array pointed at by `parray`
471
  as sparse data structures, possibly with a one-element cache for
472
  each.
473
 
474
+ [^7]: For example, because it cannot allocate space.
475
+
476
  [^8]: For example, because it cannot allocate space.
477
 
478
+ [^9]: This suggests an infinite amount of copying, but the
 
 
479
  implementation can keep track of the maximum element of the arrays
480
  that is nonzero.
481
 
482
+ [^10]: Checking `badbit` also for `fail()` is historical practice.
483
 
484
+ [^11]: The function signature `dec(ios_base&)` can be called by the
485
  function signature
486
  `basic_ostream& stream::operator<<(ios_base& (*)(ios_base&))` to
487
  permit expressions of the form `cout << dec` to change the format
488
  flags stored in `cout`.
489
 
490
+ [^12]: The default constructor is protected for class `basic_streambuf`
491
+ to assure that only objects for classes derived from this class can
492
  be constructed.
493
 
494
+ [^13]: The morphemes of `showmanyc` are “es-how-many-see”, not
495
+ “show-manic”.
496
+
497
+ [^14]: `underflow` or `uflow` can fail by throwing an exception
498
  prematurely. The intention is not only that the calls will not
499
  return `eof()` but that they will return “immediately”.
500
 
501
  [^15]: Classes derived from `basic_streambuf` can provide more efficient
502
  ways to implement `xsgetn()` and `xsputn()` by overriding these
503
  definitions from the base class.
504
 
505
+ [^16]: That is, for each class derived from a specialization of
506
+ `basic_streambuf` in this Clause [[stringbuf]], [[filebuf]],
507
+ a specification of how consuming a character effects the associated
508
+ output sequence is given. There is no requirement on a
509
+ program-defined class.
510
 
511
  [^17]: Typically, `overflow` returns `c` to indicate success, except
512
  when `traits::eq_int_type(c, traits::eof())` returns `true`, in
513
  which case it returns `traits::not_eof(c)`.
514
 
 
517
  specified.
518
 
519
  [^19]: The `sentry` constructor and destructor can also perform
520
  additional implementation-dependent operations.
521
 
522
+ [^20]: See, for example, the function signature
 
 
523
  `ws(basic_istream&)`[[istream.manip]].
524
 
525
+ [^21]: See, for example, the function signature
526
  `dec(ios_base&)`[[basefield.manip]].
527
 
528
+ [^22]: Note that this function is not overloaded on types `signed char`
529
+ and `unsigned char`.
530
+
531
+ [^23]: Note that this function is not overloaded on types `signed char`
532
+ and `unsigned char`.
533
 
534
  [^24]: Note that this function is not overloaded on types `signed char`
535
  and `unsigned char`.
536
 
537
+ [^25]: Since the final input character is “extracted”, it is counted in
 
 
 
 
 
 
538
  the `gcount()`, even though it is not stored.
539
 
540
+ [^26]: This allows an input line which exactly fills the buffer, without
541
  setting `failbit`. This is different behavior than the historical
542
  AT&T implementation.
543
 
544
+ [^27]: This implies an empty input line will not cause `failbit` to be
545
  set.
546
 
547
+ [^28]: Note that this function is not overloaded on types `signed char`
548
  and `unsigned char`.
549
 
550
+ [^29]: The call `os.tie()->flush()` does not necessarily occur if the
551
  function can determine that no synchronization is necessary.
552
 
553
+ [^30]: The `sentry` constructor and destructor can also perform
554
  additional implementation-dependent operations.
555
 
556
+ [^31]: This is done without causing an `ios_base::failure` to be thrown.
557
 
558
+ [^32]: See, for example, the function signature
559
  `endl(basic_ostream&)`[[ostream.manip]].
560
 
561
+ [^33]: See, for example, the function signature
562
  `dec(ios_base&)`[[basefield.manip]].
563
 
564
+ [^34]: This is done without causing an `ios_base::failure` to be thrown.
565
 
566
+ [^35]: Note that this function is not overloaded on types `signed char`
567
  and `unsigned char`.
568
 
569
+ [^36]: Note that this function is not overloaded on types `signed char`
570
  and `unsigned char`.
571
 
572
+ [^37]: The expression `cin >> resetiosflags(ios_base::skipws)` clears
573
  `ios_base::skipws` in the format flags stored in the
574
  `basic_istream<charT, traits>` object `cin` (the same as
575
  `cin >> noskipws`), and the expression
576
  `cout << resetiosflags(ios_base::showbase)` clears
577
  `ios_base::showbase` in the format flags stored in the
578
  `basic_ostream<charT, traits>` object `cout` (the same as
579
  `cout << noshowbase`).
580
 
581
+ [^38]: The macro `SEEK_END` is defined, and the function signatures
582
  `fopen(const char*, const char*)` and `fseek(FILE*, long, int)` are
583
  declared, in `<cstdio>`.