|
1280 | 1280 | \tcode{<cwctype>} \\
|
1281 | 1281 | \end{multicolfloattable}
|
1282 | 1282 |
|
| 1283 | +\pnum |
| 1284 | +The headers listed in \tref{headers.cpp}, or, |
| 1285 | +for a freestanding implementation, |
| 1286 | +the subset of such headers that are provided by the implementation, |
| 1287 | +are collectively known as |
| 1288 | +the \defnadj{importable}{\Cpp{} library headers}. |
| 1289 | +\begin{note} |
| 1290 | +Importable \Cpp{} library headers can be |
| 1291 | +imported as module units\iref{module.import}. |
| 1292 | +\end{note} |
| 1293 | +\begin{example} |
| 1294 | +\begin{codeblock} |
| 1295 | +import <vector>; // imports the \tcode{<vector>} header unit |
| 1296 | +std::vector<int> vi; // OK |
| 1297 | +\end{codeblock} |
| 1298 | +\end{example} |
| 1299 | + |
1283 | 1300 | \pnum
|
1284 | 1301 | Except as noted in \ref{library} through \ref{\lastlibchapter}
|
1285 | 1302 | and \ref{depr}, the contents of each header \tcode{c\placeholder{name}} is
|
|
1504 | 1521 | The entities in the \Cpp{} standard library are defined in headers,
|
1505 | 1522 | whose contents are made available to a translation unit when it contains the appropriate
|
1506 | 1523 | \indextext{unit!translation}%
|
1507 |
| -\tcode{\#include} |
1508 |
| -preprocessing directive\iref{cpp.include}.% |
1509 | 1524 | \indextext{\idxcode{\#include}}%
|
| 1525 | +\tcode{\#include} |
| 1526 | +preprocessing directive\iref{cpp.include} |
| 1527 | +or the appropriate |
| 1528 | +\indextext{\idxcode{import}}% |
| 1529 | +\tcode{import} declaration\iref{module.import}. |
1510 | 1530 | \indextext{source file}
|
1511 | 1531 |
|
1512 | 1532 | \pnum
|
|
1528 | 1548 | \pnum
|
1529 | 1549 | A translation unit shall include a header only outside of any
|
1530 | 1550 | \indextext{unit!translation}%
|
1531 |
| -declaration or definition, and shall include the header lexically |
| 1551 | +declaration or definition and, |
| 1552 | +in the case of a module unit, |
| 1553 | +only in its \grammarterm{global-module-fragment}, and |
| 1554 | +shall include the header or import the corresponding header unit lexically |
1532 | 1555 | before the first reference in that translation unit to any of the entities
|
1533 | 1556 | declared in that header. No diagnostic is required.
|
1534 | 1557 |
|
|
0 commit comments