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