From Jason Turner

[conforming]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1q38pd_y/{from.md → to.md} +196 -142
tmp/tmp1q38pd_y/{from.md → to.md} RENAMED
@@ -1,33 +1,32 @@
1
  ### Conforming implementations <a id="conforming">[[conforming]]</a>
2
 
3
  #### Overview <a id="conforming.overview">[[conforming.overview]]</a>
4
 
5
- This section describes the constraints upon, and latitude of,
6
- implementations of the C++standard library.
7
 
8
  An implementation’s use of headers is discussed in  [[res.on.headers]],
9
  its use of macros in  [[res.on.macro.definitions]], non-member functions
10
  in  [[global.functions]], member functions in  [[member.functions]],
11
  data race avoidance in  [[res.on.data.races]], access specifiers in 
12
  [[protection.within.classes]], class derivation in  [[derivation]], and
13
  exceptions in  [[res.on.exception.handling]].
14
 
15
  #### Headers <a id="res.on.headers">[[res.on.headers]]</a>
16
 
17
- A C++header may include other C++headers. A C++header shall provide the
18
- declarations and definitions that appear in its synopsis. A C++header
19
- shown in its synopsis as including other C++headers shall provide the
20
- declarations and definitions that appear in the synopses of those other
21
- 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 (
26
- [[basic.def.odr]]).
27
 
28
- The C standard library headers ([[depr.c.headers]]) shall include only
29
  their corresponding C++ standard library header, as described in 
30
  [[headers]].
31
 
32
  #### Restrictions on macro definitions <a id="res.on.macro.definitions">[[res.on.macro.definitions]]</a>
33
 
@@ -40,31 +39,30 @@ suitable for use in `#if` preprocessing directives, unless explicitly
40
  stated otherwise.
41
 
42
  #### Non-member functions <a id="global.functions">[[global.functions]]</a>
43
 
44
  It is unspecified whether any non-member functions in the C++ standard
45
- library are defined as `inline` ([[dcl.inline]]).
46
 
47
- A call to a non-member function signature described in Clauses 
48
- [[language.support]] through  [[thread]] and Annex  [[depr]] shall
49
- behave as if the implementation declared no additional non-member
50
- function signatures.[^26]
51
 
52
  An implementation shall not declare a non-member function signature with
53
  additional default arguments.
54
 
55
  Unless otherwise specified, calls made by functions in the standard
56
  library to non-operator, non-member functions do not use functions from
57
- another namespace which are found through *argument-dependent name
58
- lookup* ([[basic.lookup.argdep]]).
59
 
60
  [*Note 1*:
61
 
62
  The phrase “unless otherwise specified” applies to cases such as the
63
- swappable with requirements ([[swappable.requirements]]). The exception
64
  for overloaded operators allows argument-dependent lookup in cases like
65
- that of `ostream_iterator::operator=` ([[ostream.iterator.ops]]):
66
 
67
  *Effects:*
68
 
69
  ``` cpp
70
  *out_stream << value;
@@ -76,75 +74,90 @@ return *this;
76
  — *end note*]
77
 
78
  #### Member functions <a id="member.functions">[[member.functions]]</a>
79
 
80
  It is unspecified whether any member functions in the C++ standard
81
- library are defined as `inline` ([[dcl.inline]]).
82
 
83
  For a non-virtual member function described in the C++ standard library,
84
  an implementation may declare a different set of member function
85
  signatures, provided that any call to the member function that would
86
  select an overload from the set of declarations described in this
87
- International Standard behaves as if that overload were selected.
88
 
89
  [*Note 1*: For instance, an implementation may add parameters with
90
  default values, or replace a member function with default arguments with
91
  two or more member functions with equivalent behavior, or add additional
92
  signatures for a member function name. — *end note*]
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  #### Constexpr functions and constructors <a id="constexpr.functions">[[constexpr.functions]]</a>
95
 
96
- This International Standard explicitly requires that certain standard
97
- library functions are `constexpr` ([[dcl.constexpr]]). An
98
- implementation shall not declare any standard library function signature
99
- as `constexpr` except for those where it is explicitly required. Within
100
- any header that provides any non-defining declarations of constexpr
101
- functions or constructors an implementation shall provide corresponding
102
- definitions.
103
 
104
  #### Requirements for stable algorithms <a id="algorithm.stable">[[algorithm.stable]]</a>
105
 
106
  When the requirements for an algorithm state that it is “stable” without
107
  further elaboration, it means:
108
 
109
- - For the *sort* algorithms the relative order of equivalent elements is
110
  preserved.
111
- - For the *remove* and *copy* algorithms the relative order of the
112
- elements that are not removed is preserved.
113
- - For the *merge* algorithms, for equivalent elements in the original
114
- two ranges, the elements from the first range (preserving their
115
- original order) precede the elements from the second range (preserving
116
- their original order).
117
 
118
  #### Reentrancy <a id="reentrancy">[[reentrancy]]</a>
119
 
120
- Except where explicitly specified in this International Standard, it is
121
  *implementation-defined* which functions in the C++ standard library may
122
  be recursively reentered.
123
 
124
  #### Data race avoidance <a id="res.on.data.races">[[res.on.data.races]]</a>
125
 
126
- This section specifies requirements that implementations shall meet to
127
- prevent data races ([[intro.multithread]]). Every standard library
128
  function shall meet each requirement unless otherwise specified.
129
  Implementations may prevent data races in cases other than those
130
  specified below.
131
 
132
  A C++ standard library function shall not directly or indirectly access
133
- objects ([[intro.multithread]]) accessible by threads other than the
134
  current thread unless the objects are accessed directly or indirectly
135
  via the function’s arguments, including `this`.
136
 
137
  A C++ standard library function shall not directly or indirectly modify
138
- objects ([[intro.multithread]]) accessible by threads other than the
139
  current thread unless the objects are accessed directly or indirectly
140
  via the function’s non-const arguments, including `this`.
141
 
142
- [*Note 1*: This means, for example, that implementations can’t use a
143
- static object for internal purposes without synchronization because it
144
- could cause a data race even in programs that do not explicitly share
145
- objects between threads. — *end note*]
146
 
147
  A C++ standard library function shall not access objects indirectly
148
  accessible via its arguments or via elements of its container arguments
149
  except by invoking functions required by its specification on those
150
  container elements.
@@ -161,31 +174,31 @@ Implementations may share their own internal objects between threads if
161
  the objects are not visible to users and are protected against data
162
  races.
163
 
164
  Unless otherwise specified, C++ standard library functions shall perform
165
  all operations solely within the current thread if those operations have
166
- effects that are visible ([[intro.multithread]]) to users.
167
 
168
  [*Note 3*: This allows implementations to parallelize operations if
169
  there are no visible side effects. — *end note*]
170
 
171
  #### Protection within classes <a id="protection.within.classes">[[protection.within.classes]]</a>
172
 
173
  It is unspecified whether any function signature or class described in
174
- Clauses  [[language.support]] through  [[thread]] and Annex  [[depr]] is
175
- a `friend` of another class in the C++standard library.
176
 
177
  #### Derived classes <a id="derivation">[[derivation]]</a>
178
 
179
- An implementation may derive any class in the C++standard library from a
180
- class with a name reserved to the implementation.
181
 
182
  Certain classes defined in the C++ standard library are required to be
183
- derived from other classes in the C++standard library. An implementation
184
- may derive such a class directly from the required base or indirectly
185
- through a hierarchy of base classes with names reserved to the
186
- implementation.
187
 
188
  In any case:
189
 
190
  - Every base class described as `virtual` shall be virtual;
191
  - Every base class not specified as `virtual` shall not be virtual;
@@ -205,13 +218,13 @@ type.
205
 
206
  Functions from the C standard library shall not throw exceptions [^28]
207
  except when such a function calls a program-supplied function that
208
  throws an exception.[^29]
209
 
210
- Destructor operations defined in the C++standard library shall not throw
211
- exceptions. Every destructor in the C++standard library shall behave as
212
- if it had a non-throwing exception specification.
213
 
214
  Functions defined in the C++ standard library that do not have a
215
  *Throws:* paragraph but do have a potentially-throwing exception
216
  specification may throw *implementation-defined* exceptions. [^30]
217
  Implementations should report errors by throwing exceptions of or
@@ -223,157 +236,189 @@ non-virtual function by adding a non-throwing exception specification.
223
 
224
  #### Restrictions on storage of pointers <a id="res.on.pointer.storage">[[res.on.pointer.storage]]</a>
225
 
226
  Objects constructed by the standard library that may hold a
227
  user-supplied pointer value or an integer of type `std::intptr_t` shall
228
- store such values in a traceable pointer location (
229
- [[basic.stc.dynamic.safety]]).
230
 
231
  [*Note 1*: Other libraries are strongly encouraged to do the same,
232
  since not doing so may result in accidental use of pointers that are not
233
  safely derived. Libraries that store pointers outside the user’s address
234
  space should make it appear that they are stored and retrieved from a
235
  traceable pointer location. — *end note*]
236
 
237
  #### Value of error codes <a id="value.error.codes">[[value.error.codes]]</a>
238
 
239
  Certain functions in the C++ standard library report errors via a
240
- `std::error_code` ([[syserr.errcode.overview]]) object. That object’s
241
  `category()` member shall return `std::system_category()` for errors
242
  originating from the operating system, or a reference to an
243
  *implementation-defined* `error_category` object for errors originating
244
  elsewhere. The implementation shall define the possible values of
245
  `value()` for each of these error categories.
246
 
247
  [*Example 1*: For operating systems that are based on POSIX,
248
- implementations are encouraged to define the `std::system_category()`
249
- values as identical to the POSIX `errno` values, with additional values
250
- as defined by the operating system’s documentation. Implementations for
251
- operating systems that are not based on POSIX are encouraged to define
252
- values identical to the operating system’s values. For errors that do
253
- not originate from the operating system, the implementation may provide
254
- enums for the associated values. — *end example*]
255
 
256
  #### Moved-from state of library types <a id="lib.types.movedfrom">[[lib.types.movedfrom]]</a>
257
 
258
- Objects of types defined in the C++standard library may be moved from (
259
- [[class.copy]]). Move operations may be explicitly specified or
260
  implicitly generated. Unless otherwise specified, such moved-from
261
  objects shall be placed in a valid but unspecified state.
262
 
263
  <!-- Link reference definitions -->
264
  [alg.c.library]: algorithms.md#alg.c.library
265
  [alg.sorting]: algorithms.md#alg.sorting
266
  [algorithm.stable]: #algorithm.stable
267
  [algorithms]: algorithms.md#algorithms
268
  [algorithms.requirements]: algorithms.md#algorithms.requirements
269
- [alloc.errors]: language.md#alloc.errors
 
270
  [allocator.requirements]: #allocator.requirements
271
  [allocator.requirements.completeness]: #allocator.requirements.completeness
272
  [allocator.traits]: utilities.md#allocator.traits
273
  [alt.headers]: #alt.headers
274
  [atomics]: atomics.md#atomics
275
- [bad.alloc]: language.md#bad.alloc
 
 
276
  [basic.def.odr]: basic.md#basic.def.odr
277
  [basic.fundamental]: basic.md#basic.fundamental
278
  [basic.life]: basic.md#basic.life
279
  [basic.link]: basic.md#basic.link
280
  [basic.lookup.argdep]: basic.md#basic.lookup.argdep
 
 
281
  [basic.scope.namespace]: basic.md#basic.scope.namespace
282
  [basic.start]: basic.md#basic.start
283
  [basic.stc.dynamic]: basic.md#basic.stc.dynamic
284
  [basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
285
  [basic.types]: basic.md#basic.types
 
286
  [bitmask.types]: #bitmask.types
287
  [byte.strings]: #byte.strings
288
- [c.locales]: localization.md#c.locales
289
- [c.strings]: strings.md#c.strings
290
  [character.seq]: #character.seq
291
- [class.conv.ctor]: special.md#class.conv.ctor
292
- [class.copy]: special.md#class.copy
293
- [class.ctor]: special.md#class.ctor
294
- [class.dtor]: special.md#class.dtor
295
  [class.mem]: class.md#class.mem
296
  [class.mfct]: class.md#class.mfct
297
  [class.this]: class.md#class.this
298
  [class.virtual]: class.md#class.virtual
 
299
  [compliance]: #compliance
 
 
 
 
 
 
300
  [conforming]: #conforming
301
  [conforming.overview]: #conforming.overview
302
  [constexpr.functions]: #constexpr.functions
303
  [constraints]: #constraints
304
  [constraints.overview]: #constraints.overview
305
  [container.requirements]: containers.md#container.requirements
306
  [containers]: containers.md#containers
307
  [contents]: #contents
308
- [conv]: conv.md#conv
 
309
  [conventions]: #conventions
310
  [cpp.include]: cpp.md#cpp.include
311
- [cstdint]: language.md#cstdint
 
 
 
 
 
 
 
 
 
312
  [dcl.array]: dcl.md#dcl.array
313
  [dcl.attr]: dcl.md#dcl.attr
314
  [dcl.constexpr]: dcl.md#dcl.constexpr
315
  [dcl.fct.default]: dcl.md#dcl.fct.default
316
  [dcl.init]: dcl.md#dcl.init
317
  [dcl.init.list]: dcl.md#dcl.init.list
318
  [dcl.inline]: dcl.md#dcl.inline
319
  [dcl.link]: dcl.md#dcl.link
 
320
  [definitions]: #definitions
321
  [depr]: future.md#depr
322
  [depr.c.headers]: future.md#depr.c.headers
323
- [depr.cstdalign.syn]: future.md#depr.cstdalign.syn
324
- [depr.cstdbool.syn]: future.md#depr.cstdbool.syn
325
  [derivation]: #derivation
326
  [derived.classes]: #derived.classes
327
  [description]: #description
328
  [diagnostics]: diagnostics.md#diagnostics
329
  [enumerated.types]: #enumerated.types
330
  [except]: except.md#except
 
 
331
  [expos.only.types]: #expos.only.types
332
  [expr.cond]: expr.md#expr.cond
333
  [expr.const]: expr.md#expr.const
334
  [expr.delete]: expr.md#expr.delete
335
  [expr.eq]: expr.md#expr.eq
336
  [expr.new]: expr.md#expr.new
337
  [expr.rel]: expr.md#expr.rel
 
 
338
  [extern.names]: #extern.names
339
  [extern.types]: #extern.types
340
  [function.objects]: utilities.md#function.objects
341
  [functions.within.classes]: #functions.within.classes
342
  [global.functions]: #global.functions
343
  [handler.functions]: #handler.functions
344
  [hash.requirements]: #hash.requirements
345
  [headers]: #headers
 
 
 
 
346
  [input.output]: input.md#input.output
347
  [intro.compliance]: intro.md#intro.compliance
348
  [intro.defs]: intro.md#intro.defs
349
- [intro.multithread]: intro.md#intro.multithread
 
350
  [intro.refs]: intro.md#intro.refs
351
  [iterator.requirements]: iterators.md#iterator.requirements
352
- [iterator.requirements.general]: iterators.md#iterator.requirements.general
353
  [iterators]: iterators.md#iterators
354
- [language.support]: language.md#language.support
355
- [lex]: lex.md#lex
356
  [lex.phases]: lex.md#lex.phases
 
357
  [lib.types.movedfrom]: #lib.types.movedfrom
358
  [library]: #library
359
  [library.c]: #library.c
 
360
  [library.general]: #library.general
361
  [locales]: localization.md#locales
362
  [localization]: localization.md#localization
363
  [macro.names]: #macro.names
364
  [member.functions]: #member.functions
365
  [meta]: utilities.md#meta
 
366
  [multibyte.strings]: #multibyte.strings
367
  [namespace.constraints]: #namespace.constraints
368
  [namespace.def]: dcl.md#namespace.def
369
  [namespace.future]: #namespace.future
370
  [namespace.posix]: #namespace.posix
371
  [namespace.std]: #namespace.std
372
  [namespace.udecl]: dcl.md#namespace.udecl
373
- [new.delete]: language.md#new.delete
374
- [new.handler]: language.md#new.handler
 
375
  [nullablepointer.requirements]: #nullablepointer.requirements
376
  [numeric.requirements]: numerics.md#numeric.requirements
377
  [numerics]: numerics.md#numerics
378
  [objects.within.classes]: #objects.within.classes
379
  [organization]: #organization
@@ -381,71 +426,73 @@ objects shall be placed in a valid but unspecified state.
381
  [over.literal]: over.md#over.literal
382
  [over.match]: over.md#over.match
383
  [over.oper]: over.md#over.oper
384
  [protection.within.classes]: #protection.within.classes
385
  [random.access.iterators]: iterators.md#random.access.iterators
 
386
  [re]: re.md#re
387
  [reentrancy]: #reentrancy
388
  [replacement.functions]: #replacement.functions
389
  [requirements]: #requirements
390
  [res.on.arguments]: #res.on.arguments
391
  [res.on.data.races]: #res.on.data.races
392
  [res.on.exception.handling]: #res.on.exception.handling
 
393
  [res.on.functions]: #res.on.functions
394
  [res.on.headers]: #res.on.headers
395
  [res.on.macro.definitions]: #res.on.macro.definitions
396
  [res.on.objects]: #res.on.objects
397
  [res.on.pointer.storage]: #res.on.pointer.storage
398
- [res.on.required]: #res.on.required
399
  [reserved.names]: #reserved.names
 
400
  [std.exceptions]: diagnostics.md#std.exceptions
 
401
  [stream.types]: input.md#stream.types
402
  [strings]: strings.md#strings
403
  [structure]: #structure
404
  [structure.elements]: #structure.elements
405
  [structure.requirements]: #structure.requirements
406
  [structure.see.also]: #structure.see.also
407
  [structure.specifications]: #structure.specifications
408
  [structure.summary]: #structure.summary
409
- [support.dynamic]: language.md#support.dynamic
410
- [support.exception]: language.md#support.exception
411
- [support.initlist]: language.md#support.initlist
412
- [support.limits]: language.md#support.limits
413
- [support.rtti]: language.md#support.rtti
414
- [support.runtime]: language.md#support.runtime
415
- [support.start.term]: language.md#support.start.term
416
- [support.types]: language.md#support.types
 
 
 
417
  [swappable.requirements]: #swappable.requirements
418
  [syserr]: diagnostics.md#syserr
419
  [syserr.errcode.overview]: diagnostics.md#syserr.errcode.overview
420
- [tab:c.annex.k.names]: #tab:c.annex.k.names
421
- [tab:copyassignable]: #tab:copyassignable
422
- [tab:cpp.c.headers]: #tab:cpp.c.headers
423
- [tab:cpp.headers.freestanding]: #tab:cpp.headers.freestanding
424
- [tab:cpp.library.headers]: #tab:cpp.library.headers
425
- [tab:desc.var.def]: #tab:desc.var.def
426
- [tab:destructible]: #tab:destructible
427
- [tab:equalitycomparable]: #tab:equalitycomparable
428
- [tab:hash]: #tab:hash
429
- [tab:identifiers.special]: lex.md#tab:identifiers.special
430
- [tab:library.categories]: #tab:library.categories
431
- [tab:moveassignable]: #tab:moveassignable
432
- [tab:nullablepointer]: #tab:nullablepointer
433
- [tab:utilities.allocator.requirements]: #tab:utilities.allocator.requirements
434
  [temp.deduct.call]: temp.md#temp.deduct.call
 
435
  [template.bitset]: utilities.md#template.bitset
436
- [terminate.handler]: language.md#terminate.handler
437
  [thread]: thread.md#thread
 
438
  [type.descriptions]: #type.descriptions
439
  [type.descriptions.general]: #type.descriptions.general
440
  [using]: #using
441
  [using.headers]: #using.headers
442
  [using.linkage]: #using.linkage
443
  [using.overview]: #using.overview
444
  [usrlit.suffix]: #usrlit.suffix
445
  [utilities]: utilities.md#utilities
446
- [utility]: utilities.md#utility
447
  [utility.arg.requirements]: #utility.arg.requirements
448
  [utility.requirements]: #utility.requirements
449
  [value.error.codes]: #value.error.codes
450
  [zombie.names]: #zombie.names
451
 
@@ -458,60 +505,60 @@ objects shall be placed in a valid but unspecified state.
458
 
459
  [^3]: To save space, items that do not apply to a class are omitted. For
460
  example, if a class does not specify any comparison functions, there
461
  will be no “Comparison functions” subclause.
462
 
463
- [^4]: To save space, items that do not apply to a function are omitted.
464
- For example, if a function does not specify any further
465
- preconditions, there will be no *Requires:* paragraph.
466
 
467
  [^5]: This simplifies the presentation of complexity requirements in
468
  some cases.
469
 
470
  [^6]: Examples from  [[utility.requirements]] include:
471
- `EqualityComparable`, `LessThanComparable`, `CopyConstructible`.
472
- Examples from  [[iterator.requirements]] include: `InputIterator`,
473
- `ForwardIterator`.
474
 
475
- [^7]: Such as an integer type, with constant integer values (
476
- [[basic.fundamental]]).
477
 
478
- [^8]: declared in `<clocale>` ([[c.locales]]).
479
 
480
  [^9]: Many of the objects manipulated by function signatures declared in
481
- `<cstring>` ([[c.strings]]) are character sequences or NTBSs. The
482
- size of some of these character sequences is limited by a length
483
- value, maintained separately from the character sequence.
484
 
485
- [^10]: A string literal, such as `"abc"`, is a static NTBS.
486
 
487
  [^11]: An NTBS that contains characters only from the basic execution
488
  character set is also an NTMBS. Each multibyte character then
489
  consists of a single byte.
490
 
491
- [^12]: The C standard library headers (Annex  [[depr.c.headers]]) also
492
- define names within the global namespace, while the C++headers for C
493
- library facilities ([[headers]]) may also define names within the
494
  global namespace.
495
 
496
  [^13]: This gives implementers freedom to use inline namespaces to
497
  support multiple configurations of the library.
498
 
499
  [^14]: A header is not necessarily a source file, nor are the sequences
500
  delimited by `<` and `>` in header names necessarily valid source
501
- file names ([[cpp.include]]).
502
 
503
  [^15]: It is intentional that there is no C++ header for any of these C
504
  headers: `<stdatomic.h>`, `<stdnoreturn.h>`, `<threads.h>`.
505
 
506
  [^16]: This disallows the practice, allowed in C, of providing a masking
507
  macro in addition to the function prototype. The only way to achieve
508
  equivalent inline behavior in C++ is to provide a definition as an
509
  extern inline function.
510
 
511
- [^17]: In particular, including the standard header `<iso646.h>` or
512
- `<ciso646>` has no effect.
513
 
514
  [^18]: The `".h"` headers dump all their names into the global
515
  namespace, whereas the newer forms keep their names in namespace
516
  `std`. Therefore, the newer forms are the preferred forms for all
517
  uses except for C++ programs which are intended to be strictly
@@ -523,43 +570,50 @@ objects shall be placed in a valid but unspecified state.
523
  from the C standard library is by including the header that declares
524
  it, notwithstanding the latitude granted in 7.1.4 of the C Standard.
525
 
526
  [^21]: Any library code that instantiates other library templates must
527
  be prepared to work adequately with any user-supplied specialization
528
- that meets the minimum requirements of this International Standard.
529
 
530
- [^22]: The list of such reserved names includes `errno`, declared or
 
 
 
 
 
 
 
 
 
 
 
531
  defined in `<cerrno>`.
532
 
533
- [^23]: The list of such reserved function signatures with external
534
  linkage includes `setjmp(jmp_buf)`, declared or defined in
535
  `<csetjmp>`, and `va_end(va_list)`, declared or defined in
536
  `<cstdarg>`.
537
 
538
- [^24]: The function signatures declared in `<cuchar>`, `<cwchar>`, and
539
  `<cwctype>` are always reserved, notwithstanding the restrictions
540
  imposed in subclause 4.5.1 of Amendment 1 to the C Standard for
541
  these headers.
542
 
543
- [^25]: These types are `clock_t`, `div_t`, `FILE`, `fpos_t`, `lconv`,
544
- `ldiv_t`, `mbstate_t`, `ptrdiff_t`, `sig_atomic_t`, `size_t`,
545
- `time_t`, `tm`, `va_list`, `wctrans_t`, `wctype_t`, and `wint_t`.
546
-
547
  [^26]: A valid C++ program always calls the expected library non-member
548
  function. An implementation may also define additional non-member
549
  functions that would otherwise not be called by a valid C++ program.
550
 
551
  [^27]: There is an implicit exception to this rule for types that are
552
- described as synonyms for basic integral types, such as `size_t` (
553
- [[support.types]]) and `streamoff` ([[stream.types]]).
554
 
555
  [^28]: That is, the C library functions can all be treated as if they
556
  are marked `noexcept`. This allows implementations to make
557
  performance optimizations based on the absence of exceptions at
558
  runtime.
559
 
560
- [^29]: The functions `qsort()` and `bsearch()` ([[alg.c.library]]) meet
561
  this condition.
562
 
563
  [^30]: In particular, they can report a failure to allocate storage by
564
  throwing an exception of type `bad_alloc`, or a class derived from
565
- `bad_alloc` ([[bad.alloc]]).
 
1
  ### Conforming implementations <a id="conforming">[[conforming]]</a>
2
 
3
  #### Overview <a id="conforming.overview">[[conforming.overview]]</a>
4
 
5
+ Subclause [[conforming]] describes the constraints upon, and latitude
6
+ of, implementations of the C++ standard library.
7
 
8
  An implementation’s use of headers is discussed in  [[res.on.headers]],
9
  its use of macros in  [[res.on.macro.definitions]], non-member functions
10
  in  [[global.functions]], member functions in  [[member.functions]],
11
  data race avoidance in  [[res.on.data.races]], access specifiers in 
12
  [[protection.within.classes]], class derivation in  [[derivation]], and
13
  exceptions in  [[res.on.exception.handling]].
14
 
15
  #### Headers <a id="res.on.headers">[[res.on.headers]]</a>
16
 
17
+ A C++ header may include other C++ headers. A C++ header shall provide
18
+ the declarations and definitions that appear in its synopsis. A C++
19
+ header shown in its synopsis as including other C++ headers shall
20
+ provide the declarations and definitions that appear in the synopses of
21
+ 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
 
 
39
  stated otherwise.
40
 
41
  #### Non-member functions <a id="global.functions">[[global.functions]]</a>
42
 
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
54
  library to non-operator, non-member functions do not use functions from
55
+ another namespace which are found through argument-dependent name lookup
56
+ [[basic.lookup.argdep]].
57
 
58
  [*Note 1*:
59
 
60
  The phrase “unless otherwise specified” applies to cases such as the
61
+ swappable with requirements [[swappable.requirements]]. The exception
62
  for overloaded operators allows argument-dependent lookup in cases like
63
+ that of `ostream_iterator::operator=` [[ostream.iterator.ops]]:
64
 
65
  *Effects:*
66
 
67
  ``` cpp
68
  *out_stream << value;
 
74
  — *end note*]
75
 
76
  #### Member functions <a id="member.functions">[[member.functions]]</a>
77
 
78
  It is unspecified whether any member functions in the C++ standard
79
+ library are defined as inline [[dcl.inline]].
80
 
81
  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>
93
+
94
+ Whenever this document specifies a friend declaration of a function or
95
+ function template within a class or class template definition, that
96
+ declaration shall be the only declaration of that function or function
97
+ template provided by an implementation.
98
+
99
+ [*Note 1*: In particular, an implementation is not allowed to provide
100
+ an additional declaration of that function or function template at
101
+ namespace scope. — *end note*]
102
+
103
+ [*Note 2*: Such a friend function or function template declaration is
104
+ known as a hidden friend, as it is visible neither to ordinary
105
+ unqualified lookup [[basic.lookup.unqual]] nor to qualified lookup
106
+ [[basic.lookup.qual]]. — *end note*]
107
+
108
  #### Constexpr functions and constructors <a id="constexpr.functions">[[constexpr.functions]]</a>
109
 
110
+ This document explicitly requires that certain standard library
111
+ functions are `constexpr` [[dcl.constexpr]]. An implementation shall not
112
+ declare any standard library function signature as `constexpr` except
113
+ for those where it is explicitly required. Within any header that
114
+ provides any non-defining declarations of constexpr functions or
115
+ constructors an implementation shall provide corresponding definitions.
 
116
 
117
  #### Requirements for stable algorithms <a id="algorithm.stable">[[algorithm.stable]]</a>
118
 
119
  When the requirements for an algorithm state that it is “stable” without
120
  further elaboration, it means:
121
 
122
+ - For the sort algorithms the relative order of equivalent elements is
123
  preserved.
124
+ - For the remove and copy algorithms the relative order of the elements
125
+ that are not removed is preserved.
126
+ - For the merge algorithms, for equivalent elements in the original two
127
+ ranges, the elements from the first range (preserving their original
128
+ order) precede the elements from the second range (preserving their
129
+ original order).
130
 
131
  #### Reentrancy <a id="reentrancy">[[reentrancy]]</a>
132
 
133
+ Except where explicitly specified in this document, it is
134
  *implementation-defined* which functions in the C++ standard library may
135
  be recursively reentered.
136
 
137
  #### Data race avoidance <a id="res.on.data.races">[[res.on.data.races]]</a>
138
 
139
+ This subclause specifies requirements that implementations shall meet to
140
+ prevent data races [[intro.multithread]]. Every standard library
141
  function shall meet each requirement unless otherwise specified.
142
  Implementations may prevent data races in cases other than those
143
  specified below.
144
 
145
  A C++ standard library function shall not directly or indirectly access
146
+ objects [[intro.multithread]] accessible by threads other than the
147
  current thread unless the objects are accessed directly or indirectly
148
  via the function’s arguments, including `this`.
149
 
150
  A C++ standard library function shall not directly or indirectly modify
151
+ 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.
 
174
  the objects are not visible to users and are protected against data
175
  races.
176
 
177
  Unless otherwise specified, C++ standard library functions shall perform
178
  all operations solely within the current thread if those operations have
179
+ effects that are visible [[intro.multithread]] to users.
180
 
181
  [*Note 3*: This allows implementations to parallelize operations if
182
  there are no visible side effects. — *end note*]
183
 
184
  #### Protection within classes <a id="protection.within.classes">[[protection.within.classes]]</a>
185
 
186
  It is unspecified whether any function signature or class described in
187
+ [[support]] through [[thread]] and [[depr]] is a friend of another class
188
+ in the C++ standard library.
189
 
190
  #### Derived classes <a id="derivation">[[derivation]]</a>
191
 
192
+ An implementation may derive any class in the C++ standard library from
193
+ a class with a name reserved to the implementation.
194
 
195
  Certain classes defined in the C++ standard library are required to be
196
+ derived from other classes in the C++ standard library. An
197
+ implementation may derive such a class directly from the required base
198
+ or indirectly through a hierarchy of base classes with names reserved to
199
+ the implementation.
200
 
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;
 
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
 
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
255
  originating from the operating system, or a reference to an
256
  *implementation-defined* `error_category` object for errors originating
257
  elsewhere. The implementation shall define the possible values of
258
  `value()` for each of these error categories.
259
 
260
  [*Example 1*: For operating systems that are based on POSIX,
261
+ implementations should define the `std::system_category()` values as
262
+ identical to the POSIX `errno` values, with additional values as defined
263
+ by the operating system’s documentation. Implementations for operating
264
+ systems that are not based on POSIX should define values identical to
265
+ the operating system’s values. For errors that do not originate from the
266
+ operating system, the implementation may provide enums for the
267
+ associated values. — *end example*]
268
 
269
  #### Moved-from state of library types <a id="lib.types.movedfrom">[[lib.types.movedfrom]]</a>
270
 
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
296
  [basic.lookup.argdep]: basic.md#basic.lookup.argdep
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
321
+ [concepts]: concepts.md#concepts
322
+ [concepts.equality]: concepts.md#concepts.equality
323
+ [concepts.object]: concepts.md#concepts.object
324
  [conforming]: #conforming
325
  [conforming.overview]: #conforming.overview
326
  [constexpr.functions]: #constexpr.functions
327
  [constraints]: #constraints
328
  [constraints.overview]: #constraints.overview
329
  [container.requirements]: containers.md#container.requirements
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
382
  [headers]: #headers
383
+ [headers.cpp]: #headers.cpp
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
400
  [library]: #library
401
  [library.c]: #library.c
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
414
  [namespace.posix]: #namespace.posix
415
  [namespace.std]: #namespace.std
416
  [namespace.udecl]: dcl.md#namespace.udecl
417
+ [new.delete]: support.md#new.delete
418
+ [new.handler]: support.md#new.handler
419
+ [new.syn]: support.md#new.syn
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
 
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
464
+ [support.rtti]: support.md#support.rtti
465
+ [support.runtime]: support.md#support.runtime
466
+ [support.srcloc]: support.md#support.srcloc
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
 
 
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.
557
 
558
+ [^17]: In particular, including the standard header `<iso646.h>` has no
559
+ effect.
560
 
561
  [^18]: The `".h"` headers dump all their names into the global
562
  namespace, whereas the newer forms keep their names in namespace
563
  `std`. Therefore, the newer forms are the preferred forms for all
564
  uses except for C++ programs which are intended to be strictly
 
570
  from the C standard library is by including the header that declares
571
  it, notwithstanding the latitude granted in 7.1.4 of the C Standard.
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]].