From Jason Turner

[conforming]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjsrk7cbf/{from.md → to.md} +82 -96
tmp/tmpjsrk7cbf/{from.md → to.md} RENAMED
@@ -22,11 +22,11 @@ those other headers.
22
 
23
  Certain types and macros are defined in more than one header. Every such
24
  entity shall be defined such that any header that defines it may be
25
  included after any other header that also defines it [[basic.def.odr]].
26
 
27
- The C standard library headers [[depr.c.headers]] shall include only
28
  their corresponding C++ standard library header, as described in 
29
  [[headers]].
30
 
31
  #### Restrictions on macro definitions <a id="res.on.macro.definitions">[[res.on.macro.definitions]]</a>
32
 
@@ -43,11 +43,11 @@ stated otherwise.
43
  It is unspecified whether any non-member functions in the C++ standard
44
  library are defined as inline [[dcl.inline]].
45
 
46
  A call to a non-member function signature described in [[support]]
47
  through [[thread]] and [[depr]] shall behave as if the implementation
48
- declared no additional non-member function signatures.[^26]
49
 
50
  An implementation shall not declare a non-member function signature with
51
  additional default arguments.
52
 
53
  Unless otherwise specified, calls made by functions in the standard
@@ -82,11 +82,11 @@ For a non-virtual member function described in the C++ standard library,
82
  an implementation may declare a different set of member function
83
  signatures, provided that any call to the member function that would
84
  select an overload from the set of declarations described in this
85
  document behaves as if that overload were selected.
86
 
87
- [*Note 1*: For instance, an implementation may add parameters with
88
  default values, or replace a member function with default arguments with
89
  two or more member functions with equivalent behavior, or add additional
90
  signatures for a member function name. — *end note*]
91
 
92
  #### Friend functions <a id="hidden.friends">[[hidden.friends]]</a>
@@ -152,12 +152,12 @@ objects [[intro.multithread]] accessible by threads other than the
152
  current thread unless the objects are accessed directly or indirectly
153
  via the function’s non-const arguments, including `this`.
154
 
155
  [*Note 1*: This means, for example, that implementations can’t use an
156
  object with static storage duration for internal purposes without
157
- synchronization because it could cause a data race even in programs that
158
- do not explicitly share objects between threads. — *end note*]
159
 
160
  A C++ standard library function shall not access objects indirectly
161
  accessible via its arguments or via elements of its container arguments
162
  except by invoking functions required by its specification on those
163
  container elements.
@@ -201,11 +201,14 @@ the implementation.
201
  In any case:
202
 
203
  - Every base class described as `virtual` shall be virtual;
204
  - Every base class not specified as `virtual` shall not be virtual;
205
  - Unless explicitly stated otherwise, types with distinct names shall be
206
- distinct types.[^27]
 
 
 
207
 
208
  All types specified in the C++ standard library shall be non-`final`
209
  types unless otherwise specified.
210
 
211
  #### Restrictions on exception handling <a id="res.on.exception.handling">[[res.on.exception.handling]]</a>
@@ -214,41 +217,30 @@ Any of the functions defined in the C++ standard library can report a
214
  failure by throwing an exception of a type described in its *Throws:*
215
  paragraph, or of a type derived from a type named in the *Throws:*
216
  paragraph that would be caught by an exception handler for the base
217
  type.
218
 
219
- Functions from the C standard library shall not throw exceptions [^28]
 
220
  except when such a function calls a program-supplied function that
221
- throws an exception.[^29]
222
 
223
  Destructor operations defined in the C++ standard library shall not
224
  throw exceptions. Every destructor in the C++ standard library shall
225
  behave as if it had a non-throwing exception specification.
226
 
227
  Functions defined in the C++ standard library that do not have a
228
  *Throws:* paragraph but do have a potentially-throwing exception
229
- specification may throw *implementation-defined* exceptions. [^30]
 
230
  Implementations should report errors by throwing exceptions of or
231
- derived from the standard exception classes ([[bad.alloc]],
232
- [[support.exception]], [[std.exceptions]]).
233
 
234
  An implementation may strengthen the exception specification for a
235
  non-virtual function by adding a non-throwing exception specification.
236
 
237
- #### Restrictions on storage of pointers <a id="res.on.pointer.storage">[[res.on.pointer.storage]]</a>
238
-
239
- Objects constructed by the standard library that may hold a
240
- user-supplied pointer value or an integer of type `std::intptr_t` shall
241
- store such values in a traceable pointer location
242
- [[basic.stc.dynamic.safety]].
243
-
244
- [*Note 1*: Other libraries are strongly encouraged to do the same,
245
- since not doing so may result in accidental use of pointers that are not
246
- safely derived. Libraries that store pointers outside the user’s address
247
- space should make it appear that they are stored and retrieved from a
248
- traceable pointer location. — *end note*]
249
-
250
  #### Value of error codes <a id="value.error.codes">[[value.error.codes]]</a>
251
 
252
  Certain functions in the C++ standard library report errors via a
253
  `std::error_code` [[syserr.errcode.overview]] object. That object’s
254
  `category()` member shall return `std::system_category()` for errors
@@ -271,25 +263,29 @@ associated values. — *end example*]
271
  Objects of types defined in the C++ standard library may be moved from
272
  [[class.copy.ctor]]. Move operations may be explicitly specified or
273
  implicitly generated. Unless otherwise specified, such moved-from
274
  objects shall be placed in a valid but unspecified state.
275
 
 
 
 
 
 
276
  <!-- Link reference definitions -->
277
  [alg.c.library]: algorithms.md#alg.c.library
278
  [alg.sorting]: algorithms.md#alg.sorting
279
  [algorithm.stable]: #algorithm.stable
280
  [algorithms]: algorithms.md#algorithms
281
  [algorithms.requirements]: algorithms.md#algorithms.requirements
282
  [alloc.errors]: support.md#alloc.errors
283
- [allocator.req.var]: #allocator.req.var
284
  [allocator.requirements]: #allocator.requirements
285
  [allocator.requirements.completeness]: #allocator.requirements.completeness
286
- [allocator.traits]: utilities.md#allocator.traits
 
287
  [alt.headers]: #alt.headers
288
- [atomics]: atomics.md#atomics
289
- [atomics.alias]: atomics.md#atomics.alias
290
- [atomics.lockfree]: atomics.md#atomics.lockfree
291
  [bad.alloc]: support.md#bad.alloc
292
  [basic.def.odr]: basic.md#basic.def.odr
293
  [basic.fundamental]: basic.md#basic.fundamental
294
  [basic.life]: basic.md#basic.life
295
  [basic.link]: basic.md#basic.link
@@ -297,24 +293,24 @@ objects shall be placed in a valid but unspecified state.
297
  [basic.lookup.qual]: basic.md#basic.lookup.qual
298
  [basic.lookup.unqual]: basic.md#basic.lookup.unqual
299
  [basic.scope.namespace]: basic.md#basic.scope.namespace
300
  [basic.start]: basic.md#basic.start
301
  [basic.stc.dynamic]: basic.md#basic.stc.dynamic
302
- [basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
303
- [basic.types]: basic.md#basic.types
304
- [bit]: numerics.md#bit
305
  [bitmask.types]: #bitmask.types
306
  [byte.strings]: #byte.strings
307
  [c.annex.k.names]: #c.annex.k.names
 
 
308
  [character.seq]: #character.seq
 
309
  [class.copy.assign]: class.md#class.copy.assign
310
  [class.copy.ctor]: class.md#class.copy.ctor
311
  [class.dtor]: class.md#class.dtor
312
  [class.mem]: class.md#class.mem
313
- [class.mfct]: class.md#class.mfct
314
- [class.this]: class.md#class.this
315
  [class.virtual]: class.md#class.virtual
 
316
  [cmp]: support.md#cmp
317
  [compliance]: #compliance
318
  [concept.destructible]: concepts.md#concept.destructible
319
  [concept.invocable]: concepts.md#concept.invocable
320
  [concept.totallyordered]: concepts.md#concept.totallyordered
@@ -330,52 +326,48 @@ objects shall be placed in a valid but unspecified state.
330
  [containers]: containers.md#containers
331
  [contents]: #contents
332
  [conv]: expr.md#conv
333
  [conv.func]: expr.md#conv.func
334
  [conventions]: #conventions
 
335
  [cpp.include]: cpp.md#cpp.include
336
  [cpp.replace]: cpp.md#cpp.replace
337
- [cpp17.allocator]: #cpp17.allocator
338
  [cpp17.copyassignable]: #cpp17.copyassignable
339
  [cpp17.copyconstructible]: #cpp17.copyconstructible
340
  [cpp17.destructible]: #cpp17.destructible
341
  [cpp17.hash]: #cpp17.hash
342
  [cpp17.moveassignable]: #cpp17.moveassignable
343
  [cpp17.nullablepointer]: #cpp17.nullablepointer
344
- [cstdint]: support.md#cstdint
 
 
345
  [customization.point.object]: #customization.point.object
346
  [dcl.array]: dcl.md#dcl.array
347
  [dcl.attr]: dcl.md#dcl.attr
348
  [dcl.constexpr]: dcl.md#dcl.constexpr
349
  [dcl.fct.default]: dcl.md#dcl.fct.default
350
  [dcl.init]: dcl.md#dcl.init
351
- [dcl.init.list]: dcl.md#dcl.init.list
352
  [dcl.inline]: dcl.md#dcl.inline
353
  [dcl.link]: dcl.md#dcl.link
354
  [dcl.pre]: dcl.md#dcl.pre
355
- [definitions]: #definitions
 
356
  [depr]: future.md#depr
357
- [depr.c.headers]: future.md#depr.c.headers
358
  [derivation]: #derivation
359
  [derived.classes]: #derived.classes
360
  [description]: #description
 
361
  [diagnostics]: diagnostics.md#diagnostics
362
  [enumerated.types]: #enumerated.types
363
  [except]: except.md#except
364
- [except.spec]: except.md#except.spec
365
- [expos.only.func]: #expos.only.func
366
- [expos.only.types]: #expos.only.types
367
- [expr.cond]: expr.md#expr.cond
368
- [expr.const]: expr.md#expr.const
369
  [expr.delete]: expr.md#expr.delete
370
- [expr.eq]: expr.md#expr.eq
371
  [expr.new]: expr.md#expr.new
372
- [expr.rel]: expr.md#expr.rel
373
- [expr.spaceship]: expr.md#expr.spaceship
374
  [expr.unary.op]: expr.md#expr.unary.op
375
  [extern.names]: #extern.names
376
  [extern.types]: #extern.types
 
377
  [function.objects]: utilities.md#function.objects
378
  [functions.within.classes]: #functions.within.classes
379
  [global.functions]: #global.functions
380
  [handler.functions]: #handler.functions
381
  [hash.requirements]: #hash.requirements
@@ -384,16 +376,15 @@ objects shall be placed in a valid but unspecified state.
384
  [headers.cpp.c]: #headers.cpp.c
385
  [headers.cpp.fs]: #headers.cpp.fs
386
  [hidden.friends]: #hidden.friends
387
  [input.output]: input.md#input.output
388
  [intro.compliance]: intro.md#intro.compliance
389
- [intro.defs]: intro.md#intro.defs
390
- [intro.execution]: basic.md#intro.execution
391
  [intro.multithread]: basic.md#intro.multithread
392
  [intro.refs]: intro.md#intro.refs
393
  [iterator.requirements]: iterators.md#iterator.requirements
394
  [iterators]: iterators.md#iterators
 
395
  [lex.name]: lex.md#lex.name
396
  [lex.name.special]: #lex.name.special
397
  [lex.phases]: lex.md#lex.phases
398
  [lex.separate]: lex.md#lex.separate
399
  [lib.types.movedfrom]: #lib.types.movedfrom
@@ -402,12 +393,14 @@ objects shall be placed in a valid but unspecified state.
402
  [library.categories]: #library.categories
403
  [library.general]: #library.general
404
  [locales]: localization.md#locales
405
  [localization]: localization.md#localization
406
  [macro.names]: #macro.names
 
407
  [member.functions]: #member.functions
408
- [meta]: utilities.md#meta
 
409
  [module.import]: module.md#module.import
410
  [multibyte.strings]: #multibyte.strings
411
  [namespace.constraints]: #namespace.constraints
412
  [namespace.def]: dcl.md#namespace.def
413
  [namespace.future]: #namespace.future
@@ -420,44 +413,49 @@ objects shall be placed in a valid but unspecified state.
420
  [nullablepointer.requirements]: #nullablepointer.requirements
421
  [numeric.requirements]: numerics.md#numeric.requirements
422
  [numerics]: numerics.md#numerics
423
  [objects.within.classes]: #objects.within.classes
424
  [organization]: #organization
 
425
  [ostream.iterator.ops]: iterators.md#ostream.iterator.ops
426
  [over.literal]: over.md#over.literal
427
  [over.match]: over.md#over.match
428
- [over.oper]: over.md#over.oper
429
  [protection.within.classes]: #protection.within.classes
430
  [random.access.iterators]: iterators.md#random.access.iterators
431
  [ranges]: ranges.md#ranges
 
432
  [re]: re.md#re
433
  [reentrancy]: #reentrancy
434
  [replacement.functions]: #replacement.functions
435
  [requirements]: #requirements
 
436
  [res.on.arguments]: #res.on.arguments
437
  [res.on.data.races]: #res.on.data.races
438
  [res.on.exception.handling]: #res.on.exception.handling
439
- [res.on.expects]: #res.on.expects
440
  [res.on.functions]: #res.on.functions
441
  [res.on.headers]: #res.on.headers
442
  [res.on.macro.definitions]: #res.on.macro.definitions
443
  [res.on.objects]: #res.on.objects
444
- [res.on.pointer.storage]: #res.on.pointer.storage
445
  [res.on.requirements]: #res.on.requirements
446
  [reserved.names]: #reserved.names
447
- [specialized.addressof]: utilities.md#specialized.addressof
 
448
  [std.exceptions]: diagnostics.md#std.exceptions
 
449
  [stmt.return]: stmt.md#stmt.return
450
  [stream.types]: input.md#stream.types
451
  [strings]: strings.md#strings
452
  [structure]: #structure
453
  [structure.elements]: #structure.elements
454
  [structure.requirements]: #structure.requirements
455
  [structure.see.also]: #structure.see.also
456
  [structure.specifications]: #structure.specifications
457
  [structure.summary]: #structure.summary
458
  [support]: support.md#support
 
 
459
  [support.coroutine]: support.md#support.coroutine
460
  [support.dynamic]: support.md#support.dynamic
461
  [support.exception]: support.md#support.exception
462
  [support.initlist]: support.md#support.initlist
463
  [support.limits]: support.md#support.limits
@@ -467,90 +465,93 @@ objects shall be placed in a valid but unspecified state.
467
  [support.start.term]: support.md#support.start.term
468
  [support.types]: support.md#support.types
469
  [swappable.requirements]: #swappable.requirements
470
  [syserr]: diagnostics.md#syserr
471
  [syserr.errcode.overview]: diagnostics.md#syserr.errcode.overview
472
- [tab:allocator.req.var]: #tab:allocator.req.var
473
- [tab:cpp17.allocator]: #tab:cpp17.allocator
474
  [tab:cpp17.destructible]: #tab:cpp17.destructible
475
  [tab:cpp17.equalitycomparable]: #tab:cpp17.equalitycomparable
476
  [temp]: temp.md#temp
477
  [temp.concept]: temp.md#temp.concept
478
  [temp.constr.decl]: temp.md#temp.constr.decl
479
- [temp.constr.order]: temp.md#temp.constr.order
480
  [temp.deduct.call]: temp.md#temp.deduct.call
481
- [temp.func.order]: temp.md#temp.func.order
482
  [template.bitset]: utilities.md#template.bitset
 
 
483
  [terminate.handler]: support.md#terminate.handler
484
  [thread]: thread.md#thread
485
  [time]: time.md#time
 
486
  [type.descriptions]: #type.descriptions
487
  [type.descriptions.general]: #type.descriptions.general
 
488
  [using]: #using
489
  [using.headers]: #using.headers
490
  [using.linkage]: #using.linkage
491
  [using.overview]: #using.overview
492
  [usrlit.suffix]: #usrlit.suffix
493
  [utilities]: utilities.md#utilities
 
494
  [utility.arg.requirements]: #utility.arg.requirements
495
  [utility.requirements]: #utility.requirements
 
496
  [value.error.codes]: #value.error.codes
497
  [zombie.names]: #zombie.names
498
 
499
- [^1]: To save space, items that do not apply to a Clause are omitted.
 
 
500
  For example, if a Clause does not specify any requirements, there
501
  will be no “Requirements” subclause.
502
 
503
- [^2]: Although in some cases the code given is unambiguously the optimum
504
  implementation.
505
 
506
- [^3]: To save space, items that do not apply to a class are omitted. For
507
- example, if a class does not specify any comparison functions, there
508
- will be no “Comparison functions” subclause.
 
509
 
510
- [^4]: To save space, elements that do not apply to a function are
511
  omitted. For example, if a function specifies no preconditions,
512
  there will be no *Preconditions:* element.
513
 
514
- [^5]: This simplifies the presentation of complexity requirements in
515
  some cases.
516
 
517
- [^6]: Examples from  [[utility.requirements]] include:
518
  *Cpp17EqualityComparable*, *Cpp17LessThanComparable*,
519
  *Cpp17CopyConstructible*. Examples from  [[iterator.requirements]]
520
  include: *Cpp17InputIterator*, *Cpp17ForwardIterator*.
521
 
522
- [^7]: Such as an integer type, with constant integer values
523
  [[basic.fundamental]].
524
 
525
- [^8]: declared in `<clocale>`.
526
-
527
  [^9]: Many of the objects manipulated by function signatures declared in
528
  `<cstring>` are character sequences or NTBSs. The size of some of
529
  these character sequences is limited by a length value, maintained
530
  separately from the character sequence.
531
 
532
  [^10]: A *string-literal*, such as `"abc"`, is a static NTBS.
533
 
534
- [^11]: An NTBS that contains characters only from the basic execution
535
  character set is also an NTMBS. Each multibyte character then
536
  consists of a single byte.
537
 
538
- [^12]: The C standard library headers [[depr.c.headers]] also define
539
  names within the global namespace, while the C++ headers for C
540
- library facilities [[headers]] may also define names within the
541
  global namespace.
542
 
543
  [^13]: This gives implementers freedom to use inline namespaces to
544
  support multiple configurations of the library.
545
 
546
  [^14]: A header is not necessarily a source file, nor are the sequences
547
  delimited by `<` and `>` in header names necessarily valid source
548
  file names [[cpp.include]].
549
 
550
  [^15]: It is intentional that there is no C++ header for any of these C
551
- headers: `<stdatomic.h>`, `<stdnoreturn.h>`, `<threads.h>`.
552
 
553
  [^16]: This disallows the practice, allowed in C, of providing a masking
554
  macro in addition to the function prototype. The only way to achieve
555
  equivalent inline behavior in C++ is to provide a definition as an
556
  extern inline function.
@@ -572,48 +573,33 @@ objects shall be placed in a valid but unspecified state.
572
 
573
  [^21]: Any library code that instantiates other library templates must
574
  be prepared to work adequately with any user-supplied specialization
575
  that meets the minimum requirements of this document.
576
 
577
- [^22]: Any library customization point must be prepared to work
578
- adequately with any user-defined overload that meets the minimum
579
- requirements of this document. Therefore an implementation may
580
- elect, under the as-if rule [[intro.execution]], to provide any
581
- customization point in the form of an instantiated function object
582
- [[function.objects]] even though the customization point’s
583
- specification is in the form of a function template. The template
584
- parameters of each such function object and the function parameters
585
- and return type of the object’s `operator()` must match those of the
586
- corresponding customization point’s specification.
587
-
588
- [^23]: The list of such reserved names includes `errno`, declared or
589
  defined in `<cerrno>`.
590
 
591
- [^24]: The list of such reserved function signatures with external
592
  linkage includes `setjmp(jmp_buf)`, declared or defined in
593
  `<csetjmp>`, and `va_end(va_list)`, declared or defined in
594
  `<cstdarg>`.
595
 
596
- [^25]: The function signatures declared in `<cuchar>`, `<cwchar>`, and
597
  `<cwctype>` are always reserved, notwithstanding the restrictions
598
  imposed in subclause 4.5.1 of Amendment 1 to the C Standard for
599
  these headers.
600
 
601
- [^26]: A valid C++ program always calls the expected library non-member
602
- function. An implementation may also define additional non-member
603
  functions that would otherwise not be called by a valid C++ program.
604
 
605
- [^27]: There is an implicit exception to this rule for types that are
606
- described as synonyms for basic integral types, such as `size_t`
607
- [[support.types]] and `streamoff` [[stream.types]].
608
-
609
- [^28]: That is, the C library functions can all be treated as if they
610
  are marked `noexcept`. This allows implementations to make
611
  performance optimizations based on the absence of exceptions at
612
  runtime.
613
 
614
- [^29]: The functions `qsort()` and `bsearch()` [[alg.c.library]] meet
615
  this condition.
616
 
617
- [^30]: In particular, they can report a failure to allocate storage by
618
  throwing an exception of type `bad_alloc`, or a class derived from
619
  `bad_alloc` [[bad.alloc]].
 
22
 
23
  Certain types and macros are defined in more than one header. Every such
24
  entity shall be defined such that any header that defines it may be
25
  included after any other header that also defines it [[basic.def.odr]].
26
 
27
+ The C standard library headers [[support.c.headers]] shall include only
28
  their corresponding C++ standard library header, as described in 
29
  [[headers]].
30
 
31
  #### Restrictions on macro definitions <a id="res.on.macro.definitions">[[res.on.macro.definitions]]</a>
32
 
 
43
  It is unspecified whether any non-member functions in the C++ standard
44
  library are defined as inline [[dcl.inline]].
45
 
46
  A call to a non-member function signature described in [[support]]
47
  through [[thread]] and [[depr]] shall behave as if the implementation
48
+ declared no additional non-member function signatures.[^25]
49
 
50
  An implementation shall not declare a non-member function signature with
51
  additional default arguments.
52
 
53
  Unless otherwise specified, calls made by functions in the standard
 
82
  an implementation may declare a different set of member function
83
  signatures, provided that any call to the member function that would
84
  select an overload from the set of declarations described in this
85
  document behaves as if that overload were selected.
86
 
87
+ [*Note 1*: For instance, an implementation can add parameters with
88
  default values, or replace a member function with default arguments with
89
  two or more member functions with equivalent behavior, or add additional
90
  signatures for a member function name. — *end note*]
91
 
92
  #### Friend functions <a id="hidden.friends">[[hidden.friends]]</a>
 
152
  current thread unless the objects are accessed directly or indirectly
153
  via the function’s non-const arguments, including `this`.
154
 
155
  [*Note 1*: This means, for example, that implementations can’t use an
156
  object with static storage duration for internal purposes without
157
+ synchronization because doing so can cause a data race even in programs
158
+ that do not explicitly share objects between threads. — *end note*]
159
 
160
  A C++ standard library function shall not access objects indirectly
161
  accessible via its arguments or via elements of its container arguments
162
  except by invoking functions required by its specification on those
163
  container elements.
 
201
  In any case:
202
 
203
  - Every base class described as `virtual` shall be virtual;
204
  - Every base class not specified as `virtual` shall not be virtual;
205
  - Unless explicitly stated otherwise, types with distinct names shall be
206
+ distinct types. \[*Note 1*: There is an implicit exception to this
207
+ rule for types that are described as synonyms
208
+ [[dcl.typedef]], [[namespace.udecl]], such as `size_t`
209
+ [[support.types]] and `streamoff` [[stream.types]]. — *end note*]
210
 
211
  All types specified in the C++ standard library shall be non-`final`
212
  types unless otherwise specified.
213
 
214
  #### Restrictions on exception handling <a id="res.on.exception.handling">[[res.on.exception.handling]]</a>
 
217
  failure by throwing an exception of a type described in its *Throws:*
218
  paragraph, or of a type derived from a type named in the *Throws:*
219
  paragraph that would be caught by an exception handler for the base
220
  type.
221
 
222
+ Functions from the C standard library shall not throw exceptions [^26]
223
+
224
  except when such a function calls a program-supplied function that
225
+ throws an exception.[^27]
226
 
227
  Destructor operations defined in the C++ standard library shall not
228
  throw exceptions. Every destructor in the C++ standard library shall
229
  behave as if it had a non-throwing exception specification.
230
 
231
  Functions defined in the C++ standard library that do not have a
232
  *Throws:* paragraph but do have a potentially-throwing exception
233
+ specification may throw *implementation-defined* exceptions.[^28]
234
+
235
  Implementations should report errors by throwing exceptions of or
236
+ derived from the standard exception classes
237
+ [[bad.alloc]], [[support.exception]], [[std.exceptions]].
238
 
239
  An implementation may strengthen the exception specification for a
240
  non-virtual function by adding a non-throwing exception specification.
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  #### Value of error codes <a id="value.error.codes">[[value.error.codes]]</a>
243
 
244
  Certain functions in the C++ standard library report errors via a
245
  `std::error_code` [[syserr.errcode.overview]] object. That object’s
246
  `category()` member shall return `std::system_category()` for errors
 
263
  Objects of types defined in the C++ standard library may be moved from
264
  [[class.copy.ctor]]. Move operations may be explicitly specified or
265
  implicitly generated. Unless otherwise specified, such moved-from
266
  objects shall be placed in a valid but unspecified state.
267
 
268
+ An object of a type defined in the C++ standard library may be
269
+ move-assigned [[class.copy.assign]] to itself. Unless otherwise
270
+ specified, such an assignment places the object in a valid but
271
+ unspecified state.
272
+
273
  <!-- Link reference definitions -->
274
  [alg.c.library]: algorithms.md#alg.c.library
275
  [alg.sorting]: algorithms.md#alg.sorting
276
  [algorithm.stable]: #algorithm.stable
277
  [algorithms]: algorithms.md#algorithms
278
  [algorithms.requirements]: algorithms.md#algorithms.requirements
279
  [alloc.errors]: support.md#alloc.errors
 
280
  [allocator.requirements]: #allocator.requirements
281
  [allocator.requirements.completeness]: #allocator.requirements.completeness
282
+ [allocator.requirements.general]: #allocator.requirements.general
283
+ [allocator.traits]: mem.md#allocator.traits
284
  [alt.headers]: #alt.headers
285
+ [array.creation]: containers.md#array.creation
286
+ [atomics]: thread.md#atomics
 
287
  [bad.alloc]: support.md#bad.alloc
288
  [basic.def.odr]: basic.md#basic.def.odr
289
  [basic.fundamental]: basic.md#basic.fundamental
290
  [basic.life]: basic.md#basic.life
291
  [basic.link]: basic.md#basic.link
 
293
  [basic.lookup.qual]: basic.md#basic.lookup.qual
294
  [basic.lookup.unqual]: basic.md#basic.lookup.unqual
295
  [basic.scope.namespace]: basic.md#basic.scope.namespace
296
  [basic.start]: basic.md#basic.start
297
  [basic.stc.dynamic]: basic.md#basic.stc.dynamic
298
+ [bit]: utilities.md#bit
 
 
299
  [bitmask.types]: #bitmask.types
300
  [byte.strings]: #byte.strings
301
  [c.annex.k.names]: #c.annex.k.names
302
+ [cassert.syn]: diagnostics.md#cassert.syn
303
+ [cerrno.syn]: diagnostics.md#cerrno.syn
304
  [character.seq]: #character.seq
305
+ [character.seq.general]: #character.seq.general
306
  [class.copy.assign]: class.md#class.copy.assign
307
  [class.copy.ctor]: class.md#class.copy.ctor
308
  [class.dtor]: class.md#class.dtor
309
  [class.mem]: class.md#class.mem
 
 
310
  [class.virtual]: class.md#class.virtual
311
+ [clocale.syn]: localization.md#clocale.syn
312
  [cmp]: support.md#cmp
313
  [compliance]: #compliance
314
  [concept.destructible]: concepts.md#concept.destructible
315
  [concept.invocable]: concepts.md#concept.invocable
316
  [concept.totallyordered]: concepts.md#concept.totallyordered
 
326
  [containers]: containers.md#containers
327
  [contents]: #contents
328
  [conv]: expr.md#conv
329
  [conv.func]: expr.md#conv.func
330
  [conventions]: #conventions
331
+ [conventions.general]: #conventions.general
332
  [cpp.include]: cpp.md#cpp.include
333
  [cpp.replace]: cpp.md#cpp.replace
 
334
  [cpp17.copyassignable]: #cpp17.copyassignable
335
  [cpp17.copyconstructible]: #cpp17.copyconstructible
336
  [cpp17.destructible]: #cpp17.destructible
337
  [cpp17.hash]: #cpp17.hash
338
  [cpp17.moveassignable]: #cpp17.moveassignable
339
  [cpp17.nullablepointer]: #cpp17.nullablepointer
340
+ [cstdarg.syn]: support.md#cstdarg.syn
341
+ [cstddef.syn]: support.md#cstddef.syn
342
+ [cstdint.syn]: support.md#cstdint.syn
343
  [customization.point.object]: #customization.point.object
344
  [dcl.array]: dcl.md#dcl.array
345
  [dcl.attr]: dcl.md#dcl.attr
346
  [dcl.constexpr]: dcl.md#dcl.constexpr
347
  [dcl.fct.default]: dcl.md#dcl.fct.default
348
  [dcl.init]: dcl.md#dcl.init
 
349
  [dcl.inline]: dcl.md#dcl.inline
350
  [dcl.link]: dcl.md#dcl.link
351
  [dcl.pre]: dcl.md#dcl.pre
352
+ [dcl.typedef]: dcl.md#dcl.typedef
353
+ [defns.nonconst.libcall]: intro.md#defns.nonconst.libcall
354
  [depr]: future.md#depr
 
355
  [derivation]: #derivation
356
  [derived.classes]: #derived.classes
357
  [description]: #description
358
+ [description.general]: #description.general
359
  [diagnostics]: diagnostics.md#diagnostics
360
  [enumerated.types]: #enumerated.types
361
  [except]: except.md#except
362
+ [expos.only.entity]: #expos.only.entity
 
 
 
 
363
  [expr.delete]: expr.md#expr.delete
 
364
  [expr.new]: expr.md#expr.new
 
 
365
  [expr.unary.op]: expr.md#expr.unary.op
366
  [extern.names]: #extern.names
367
  [extern.types]: #extern.types
368
+ [freestanding.item]: #freestanding.item
369
  [function.objects]: utilities.md#function.objects
370
  [functions.within.classes]: #functions.within.classes
371
  [global.functions]: #global.functions
372
  [handler.functions]: #handler.functions
373
  [hash.requirements]: #hash.requirements
 
376
  [headers.cpp.c]: #headers.cpp.c
377
  [headers.cpp.fs]: #headers.cpp.fs
378
  [hidden.friends]: #hidden.friends
379
  [input.output]: input.md#input.output
380
  [intro.compliance]: intro.md#intro.compliance
 
 
381
  [intro.multithread]: basic.md#intro.multithread
382
  [intro.refs]: intro.md#intro.refs
383
  [iterator.requirements]: iterators.md#iterator.requirements
384
  [iterators]: iterators.md#iterators
385
+ [lex.charset]: lex.md#lex.charset
386
  [lex.name]: lex.md#lex.name
387
  [lex.name.special]: #lex.name.special
388
  [lex.phases]: lex.md#lex.phases
389
  [lex.separate]: lex.md#lex.separate
390
  [lib.types.movedfrom]: #lib.types.movedfrom
 
393
  [library.categories]: #library.categories
394
  [library.general]: #library.general
395
  [locales]: localization.md#locales
396
  [localization]: localization.md#localization
397
  [macro.names]: #macro.names
398
+ [mem]: mem.md#mem
399
  [member.functions]: #member.functions
400
+ [memory]: mem.md#memory
401
+ [meta]: meta.md#meta
402
  [module.import]: module.md#module.import
403
  [multibyte.strings]: #multibyte.strings
404
  [namespace.constraints]: #namespace.constraints
405
  [namespace.def]: dcl.md#namespace.def
406
  [namespace.future]: #namespace.future
 
413
  [nullablepointer.requirements]: #nullablepointer.requirements
414
  [numeric.requirements]: numerics.md#numeric.requirements
415
  [numerics]: numerics.md#numerics
416
  [objects.within.classes]: #objects.within.classes
417
  [organization]: #organization
418
+ [organization.general]: #organization.general
419
  [ostream.iterator.ops]: iterators.md#ostream.iterator.ops
420
  [over.literal]: over.md#over.literal
421
  [over.match]: over.md#over.match
422
+ [over.match.oper]: over.md#over.match.oper
423
  [protection.within.classes]: #protection.within.classes
424
  [random.access.iterators]: iterators.md#random.access.iterators
425
  [ranges]: ranges.md#ranges
426
+ [ratio]: meta.md#ratio
427
  [re]: re.md#re
428
  [reentrancy]: #reentrancy
429
  [replacement.functions]: #replacement.functions
430
  [requirements]: #requirements
431
+ [requirements.general]: #requirements.general
432
  [res.on.arguments]: #res.on.arguments
433
  [res.on.data.races]: #res.on.data.races
434
  [res.on.exception.handling]: #res.on.exception.handling
 
435
  [res.on.functions]: #res.on.functions
436
  [res.on.headers]: #res.on.headers
437
  [res.on.macro.definitions]: #res.on.macro.definitions
438
  [res.on.objects]: #res.on.objects
 
439
  [res.on.requirements]: #res.on.requirements
440
  [reserved.names]: #reserved.names
441
+ [reserved.names.general]: #reserved.names.general
442
+ [specialized.addressof]: mem.md#specialized.addressof
443
  [std.exceptions]: diagnostics.md#std.exceptions
444
+ [std.modules]: #std.modules
445
  [stmt.return]: stmt.md#stmt.return
446
  [stream.types]: input.md#stream.types
447
  [strings]: strings.md#strings
448
  [structure]: #structure
449
  [structure.elements]: #structure.elements
450
  [structure.requirements]: #structure.requirements
451
  [structure.see.also]: #structure.see.also
452
  [structure.specifications]: #structure.specifications
453
  [structure.summary]: #structure.summary
454
  [support]: support.md#support
455
+ [support.c.headers]: support.md#support.c.headers
456
+ [support.c.headers.other]: support.md#support.c.headers.other
457
  [support.coroutine]: support.md#support.coroutine
458
  [support.dynamic]: support.md#support.dynamic
459
  [support.exception]: support.md#support.exception
460
  [support.initlist]: support.md#support.initlist
461
  [support.limits]: support.md#support.limits
 
465
  [support.start.term]: support.md#support.start.term
466
  [support.types]: support.md#support.types
467
  [swappable.requirements]: #swappable.requirements
468
  [syserr]: diagnostics.md#syserr
469
  [syserr.errcode.overview]: diagnostics.md#syserr.errcode.overview
 
 
470
  [tab:cpp17.destructible]: #tab:cpp17.destructible
471
  [tab:cpp17.equalitycomparable]: #tab:cpp17.equalitycomparable
472
  [temp]: temp.md#temp
473
  [temp.concept]: temp.md#temp.concept
474
  [temp.constr.decl]: temp.md#temp.constr.decl
 
475
  [temp.deduct.call]: temp.md#temp.deduct.call
 
476
  [template.bitset]: utilities.md#template.bitset
477
+ [term.incomplete.type]: basic.md#term.incomplete.type
478
+ [term.object.type]: basic.md#term.object.type
479
  [terminate.handler]: support.md#terminate.handler
480
  [thread]: thread.md#thread
481
  [time]: time.md#time
482
+ [tuple]: utilities.md#tuple
483
  [type.descriptions]: #type.descriptions
484
  [type.descriptions.general]: #type.descriptions.general
485
+ [type.traits]: meta.md#type.traits
486
  [using]: #using
487
  [using.headers]: #using.headers
488
  [using.linkage]: #using.linkage
489
  [using.overview]: #using.overview
490
  [usrlit.suffix]: #usrlit.suffix
491
  [utilities]: utilities.md#utilities
492
+ [utility]: utilities.md#utility
493
  [utility.arg.requirements]: #utility.arg.requirements
494
  [utility.requirements]: #utility.requirements
495
+ [utility.requirements.general]: #utility.requirements.general
496
  [value.error.codes]: #value.error.codes
497
  [zombie.names]: #zombie.names
498
 
499
+ [^1]: See also ISO/IEC 9899:2018 section 7.6.
500
+
501
+ [^2]: To save space, items that do not apply to a Clause are omitted.
502
  For example, if a Clause does not specify any requirements, there
503
  will be no “Requirements” subclause.
504
 
505
+ [^3]: Although in some cases the code given is unambiguously the optimum
506
  implementation.
507
 
508
+ [^4]: To save space, items that do not apply to a class are omitted. For
509
+ example, if a class does not specify any comparison operator
510
+ functions, there will be no “Comparison operator functions”
511
+ subclause.
512
 
513
+ [^5]: To save space, elements that do not apply to a function are
514
  omitted. For example, if a function specifies no preconditions,
515
  there will be no *Preconditions:* element.
516
 
517
+ [^6]: This simplifies the presentation of complexity requirements in
518
  some cases.
519
 
520
+ [^7]: Examples from  [[utility.requirements]] include:
521
  *Cpp17EqualityComparable*, *Cpp17LessThanComparable*,
522
  *Cpp17CopyConstructible*. Examples from  [[iterator.requirements]]
523
  include: *Cpp17InputIterator*, *Cpp17ForwardIterator*.
524
 
525
+ [^8]: Such as an integer type, with constant integer values
526
  [[basic.fundamental]].
527
 
 
 
528
  [^9]: Many of the objects manipulated by function signatures declared in
529
  `<cstring>` are character sequences or NTBSs. The size of some of
530
  these character sequences is limited by a length value, maintained
531
  separately from the character sequence.
532
 
533
  [^10]: A *string-literal*, such as `"abc"`, is a static NTBS.
534
 
535
+ [^11]: An NTBS that contains characters only from the basic literal
536
  character set is also an NTMBS. Each multibyte character then
537
  consists of a single byte.
538
 
539
+ [^12]: The C standard library headers [[support.c.headers]] also define
540
  names within the global namespace, while the C++ headers for C
541
+ library facilities [[headers]] can also define names within the
542
  global namespace.
543
 
544
  [^13]: This gives implementers freedom to use inline namespaces to
545
  support multiple configurations of the library.
546
 
547
  [^14]: A header is not necessarily a source file, nor are the sequences
548
  delimited by `<` and `>` in header names necessarily valid source
549
  file names [[cpp.include]].
550
 
551
  [^15]: It is intentional that there is no C++ header for any of these C
552
+ headers: `<stdnoreturn.h>`, `<threads.h>`.
553
 
554
  [^16]: This disallows the practice, allowed in C, of providing a masking
555
  macro in addition to the function prototype. The only way to achieve
556
  equivalent inline behavior in C++ is to provide a definition as an
557
  extern inline function.
 
573
 
574
  [^21]: Any library code that instantiates other library templates must
575
  be prepared to work adequately with any user-supplied specialization
576
  that meets the minimum requirements of this document.
577
 
578
+ [^22]: The list of such reserved names includes `errno`, declared or
 
 
 
 
 
 
 
 
 
 
 
579
  defined in `<cerrno>`.
580
 
581
+ [^23]: The list of such reserved function signatures with external
582
  linkage includes `setjmp(jmp_buf)`, declared or defined in
583
  `<csetjmp>`, and `va_end(va_list)`, declared or defined in
584
  `<cstdarg>`.
585
 
586
+ [^24]: The function signatures declared in `<cuchar>`, `<cwchar>`, and
587
  `<cwctype>` are always reserved, notwithstanding the restrictions
588
  imposed in subclause 4.5.1 of Amendment 1 to the C Standard for
589
  these headers.
590
 
591
+ [^25]: A valid C++ program always calls the expected library non-member
592
+ function. An implementation can also define additional non-member
593
  functions that would otherwise not be called by a valid C++ program.
594
 
595
+ [^26]: That is, the C library functions can all be treated as if they
 
 
 
 
596
  are marked `noexcept`. This allows implementations to make
597
  performance optimizations based on the absence of exceptions at
598
  runtime.
599
 
600
+ [^27]: The functions `qsort()` and `bsearch()` [[alg.c.library]] meet
601
  this condition.
602
 
603
+ [^28]: In particular, they can report a failure to allocate storage by
604
  throwing an exception of type `bad_alloc`, or a class derived from
605
  `bad_alloc` [[bad.alloc]].