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

48 lines
2.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[using.linkage]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [[requirements]](requirements#using.linkage)
### 16.4.3 Using the library [[using]](using#linkage)
#### 16.4.3.3 Linkage [using.linkage]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1724)
Entities in the C++ standard library have [external linkage](basic.link "6.7Program and linkage[basic.link]")[.](#1.sentence-1)
Unless otherwise specified, objects and functions have the defaultextern "C++" linkage ([[dcl.link]](dcl.link "9.12Linkage specifications"))[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1730)
Whether a name from the C standard library declared with
external linkage hasextern "C" orextern "C++" linkage is implementation-defined[.](#2.sentence-1)
It is recommended that an
implementation useextern "C++" linkage for this purpose[.](#2.sentence-2)[150](#footnote-150 "The only reliable way to declare an object or function signature from the C standard library is by including the header that declares it, notwithstanding the latitude granted in ISO/IEC 9899:2024, 7.1.4.")
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1751)
Objects and functions
defined in the library and required by a C++ program are included in
the program prior to program startup[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1757)
See also[replacement functions](replacement.functions "16.4.5.6Replacement functions[replacement.functions]"),[runtime changes](handler.functions "16.4.5.7Handler functions[handler.functions]")[.](#4.sentence-1)
[150)](#footnote-150)[150)](#footnoteref-150)
The only reliable way to declare an object or
function signature from the C standard library is by including the header that
declares it, notwithstanding the latitude granted in ISO/IEC 9899:2024, 7.1.4[.](#footnote-150.sentence-1)