tmp/tmp9kp23tjv/{from.md → to.md}
RENAMED
|
@@ -1,43 +1,46 @@
|
|
| 1 |
### Using the library <a id="using">[[using]]</a>
|
| 2 |
|
| 3 |
#### Overview <a id="using.overview">[[using.overview]]</a>
|
| 4 |
|
| 5 |
-
|
| 6 |
-
of the C++standard library. [[using.headers]] describes
|
| 7 |
-
translation phase 4, while [[using.linkage]] describes
|
| 8 |
-
phase 8
|
| 9 |
|
| 10 |
#### Headers <a id="using.headers">[[using.headers]]</a>
|
| 11 |
|
| 12 |
The entities in the C++ standard library are defined in headers, whose
|
| 13 |
contents are made available to a translation unit when it contains the
|
| 14 |
-
appropriate `#include` preprocessing directive
|
|
|
|
| 15 |
|
| 16 |
-
A translation unit may include library headers in any order
|
| 17 |
-
[[lex]]
|
| 18 |
-
from being included exactly once, except that the effect of
|
| 19 |
-
either `<cassert>` or `<assert.h>` depends each time on the
|
| 20 |
-
current definition of `NDEBUG`.[^19]
|
| 21 |
|
| 22 |
A translation unit shall include a header only outside of any
|
| 23 |
-
declaration or definition
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
|
| 27 |
#### Linkage <a id="using.linkage">[[using.linkage]]</a>
|
| 28 |
|
| 29 |
-
Entities in the C++standard library have external linkage
|
| 30 |
-
[[basic.link]]
|
| 31 |
-
the default `extern "C++"` linkage
|
| 32 |
|
| 33 |
Whether a name from the C standard library declared with external
|
| 34 |
linkage has `extern "C"` or `extern "C++"` linkage is
|
| 35 |
*implementation-defined*. It is recommended that an implementation use
|
| 36 |
`extern "C++"` linkage for this purpose.[^20]
|
| 37 |
|
| 38 |
-
Objects and functions defined in the library and required by a
|
| 39 |
-
|
| 40 |
|
| 41 |
-
See also replacement functions
|
| 42 |
-
changes
|
| 43 |
|
|
|
|
| 1 |
### Using the library <a id="using">[[using]]</a>
|
| 2 |
|
| 3 |
#### Overview <a id="using.overview">[[using.overview]]</a>
|
| 4 |
|
| 5 |
+
Subclause [[using]] describes how a C++ program gains access to the
|
| 6 |
+
facilities of the C++ standard library. [[using.headers]] describes
|
| 7 |
+
effects during translation phase 4, while [[using.linkage]] describes
|
| 8 |
+
effects during phase 8 [[lex.phases]].
|
| 9 |
|
| 10 |
#### Headers <a id="using.headers">[[using.headers]]</a>
|
| 11 |
|
| 12 |
The entities in the C++ standard library are defined in headers, whose
|
| 13 |
contents are made available to a translation unit when it contains the
|
| 14 |
+
appropriate `#include` preprocessing directive [[cpp.include]] or the
|
| 15 |
+
appropriate `import` declaration [[module.import]].
|
| 16 |
|
| 17 |
+
A translation unit may include library headers in any order
|
| 18 |
+
[[lex.separate]]. Each may be included more than once, with no effect
|
| 19 |
+
different from being included exactly once, except that the effect of
|
| 20 |
+
including either `<cassert>` or `<assert.h>` depends each time on the
|
| 21 |
+
lexically current definition of `NDEBUG`.[^19]
|
| 22 |
|
| 23 |
A translation unit shall include a header only outside of any
|
| 24 |
+
declaration or definition and, in the case of a module unit, only in its
|
| 25 |
+
*global-module-fragment*, and shall include the header or import the
|
| 26 |
+
corresponding header unit lexically before the first reference in that
|
| 27 |
+
translation unit to any of the entities declared in that header. No
|
| 28 |
+
diagnostic is required.
|
| 29 |
|
| 30 |
#### Linkage <a id="using.linkage">[[using.linkage]]</a>
|
| 31 |
|
| 32 |
+
Entities in the C++ standard library have external linkage
|
| 33 |
+
[[basic.link]]. Unless otherwise specified, objects and functions have
|
| 34 |
+
the default `extern "C++"` linkage [[dcl.link]].
|
| 35 |
|
| 36 |
Whether a name from the C standard library declared with external
|
| 37 |
linkage has `extern "C"` or `extern "C++"` linkage is
|
| 38 |
*implementation-defined*. It is recommended that an implementation use
|
| 39 |
`extern "C++"` linkage for this purpose.[^20]
|
| 40 |
|
| 41 |
+
Objects and functions defined in the library and required by a C++
|
| 42 |
+
program are included in the program prior to program startup.
|
| 43 |
|
| 44 |
+
See also replacement functions [[replacement.functions]], runtime
|
| 45 |
+
changes [[handler.functions]].
|
| 46 |
|