Files
cppdraft_translate/cppdraft/library/c.md
2025-10-25 03:02:53 +03:00

2.2 KiB

[library.c]

16 Library introduction [library]

16.2 The C standard library [library.c]

1

#

The C++ standard library also makes available the facilities of the C standard library,suitably adjusted to ensure static type safety.

2

#

The descriptions of many library functions rely on the C standard library for the semantics of those functions.

In some cases, the signatures specified in this document may be different from the signatures in the C standard library, and additional overloads may be declared in this document, but the behavior and the preconditions (including any preconditions implied by the use of a C restrict qualifier) are the same unless otherwise stated.

3

#

A call to a C standard library function is a non-constant library call ([defns.nonconst.libcall]) if it raises a floating-point exception other than FE_INEXACT.

The semantics of a call to a C standard library function evaluated as a core constant expression are those specified in ISO/IEC 9899:2024, Annex F131 to the extent applicable to the floating-point types ([basic.fundamental]) that are parameter types of the called function.

[Note 1:

ISO/IEC 9899:2024, Annex F specifies the conditions under which floating-point exceptions are raised and the behavior when NaNs and/or infinities are passed as arguments.

— end note]

[Note 2:

Equivalently, a call to a C standard library function is a non-constant library call if errno is set when math_errhandling & MATH_ERRNO is true.

— end note]

131)131)

See also ISO/IEC 9899:2024, 7.6.