Files
cppdraft_translate/cppdraft/res/on/functions.md
2025-10-25 03:02:53 +03:00

2.7 KiB

[res.on.functions]

16 Library introduction [library]

16.4 Library-wide requirements [requirements]

16.4.5 Constraints on programs [constraints]

16.4.5.8 Other functions [res.on.functions]

1

#

In certain cases (replacement functions, handler functions, operations on types used to instantiate standard library template components), the C++ standard library depends on components supplied by a C++ program.

If these components do not meet their requirements, this document places no requirements on the implementation.

2

#

In particular, the behavior is undefined in the following cases:

  • (2.1)

    For replacement functions ([replacement.functions]), if the installed replacement function does not implement the semantics of the applicableRequired behavior: paragraph.

  • (2.2)

    For handler functions ([new.handler], [terminate.handler]), if the installed handler function does not implement the semantics of the applicableRequired behavior: paragraph.

  • (2.3)

    For types used as template arguments when instantiating a template component, if the operations on the type do not implement the semantics of the applicableRequirements subclause ([allocator.requirements], [container.requirements], [iterator.requirements], [algorithms.requirements], [numeric.requirements]). Operations on such types can report a failure by throwing an exception unless otherwise specified.

  • (2.4)

    If any replacement function or handler function or destructor operation exits via an exception, unless specifically allowed in the applicableRequired behavior: paragraph.

  • (2.5)

    If an incomplete type ([basic.types.general]) is used as a template argument when instantiating a template component or evaluating a concept, unless specifically allowed for that component.