62 lines
2.2 KiB
Markdown
62 lines
2.2 KiB
Markdown
[library.c]
|
||
|
||
# 16 Library introduction [[library]](./#library)
|
||
|
||
## 16.2 The C standard library [library.c]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L136)
|
||
|
||
The C++ standard library also makes available the facilities of the C standard library,suitably adjusted to ensure static type safety[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L141)
|
||
|
||
The descriptions of many library functions rely on the C standard library for
|
||
the semantics of those functions[.](#2.sentence-1)
|
||
|
||
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[.](#2.sentence-2)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L153)
|
||
|
||
A call to a C standard library function is
|
||
a non-constant library call ([[defns.nonconst.libcall]](defns.nonconst.libcall "3.35 non-constant library call"))
|
||
if it raises a floating-point exception other than FE_INEXACT[.](#3.sentence-1)
|
||
|
||
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 F[131](#footnote-131 "See also ISO/IEC 9899:2024, 7.6.") to the extent applicable to the floating-point types ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types"))
|
||
that are parameter types of the called function[.](#3.sentence-2)
|
||
|
||
[*Note [1](#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[.](#3.sentence-3)
|
||
|
||
â *end note*]
|
||
|
||
[*Note [2](#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[.](#3.sentence-4)
|
||
|
||
â *end note*]
|
||
|
||
[131)](#footnote-131)[131)](#footnoteref-131)
|
||
|
||
See also ISO/IEC 9899:2024, 7.6[.](#footnote-131.sentence-1)
|