|
908 | 908 | \pnum
|
909 | 909 | An implementation may use any technique that provides equivalent observable behavior.
|
910 | 910 |
|
| 911 | +\rSec3[freestanding.entity]{Freestanding entities} |
| 912 | + |
| 913 | +\pnum |
| 914 | +\indextext{entity!freestanding|see{freestanding entity}}% |
| 915 | +A \defn{freestanding entity} is a declaration or macro definition |
| 916 | +that is present in a freestanding implementation and a hosted implementation. |
| 917 | + |
| 918 | +\pnum |
| 919 | +Unless otherwise specified, |
| 920 | +the requirements on freestanding entities on a freestanding implementation |
| 921 | +are the same as the corresponding requirements in a hosted implementation. |
| 922 | + |
| 923 | +\pnum |
| 924 | +In a header synopsis, entities followed with a comment |
| 925 | +that includes \textit{freestanding} are freestanding entities. |
| 926 | +\begin{example} |
| 927 | +\begin{codeblock} |
| 928 | +#define NULL @\seebelow@ // freestanding |
| 929 | +\end{codeblock} |
| 930 | +\end{example} |
| 931 | + |
| 932 | +\pnum |
| 933 | +If a header synopsis begins with a comment |
| 934 | +that includes \textit{all freestanding}, |
| 935 | +then all of the declarations and macro definitions in the header synopsis |
| 936 | +are freestanding entities. |
| 937 | +\begin{example} |
| 938 | +\begin{codeblock} |
| 939 | +// all freestanding |
| 940 | +namespace std { |
| 941 | +\end{codeblock} |
| 942 | +\end{example} |
| 943 | + |
| 944 | +\pnum |
| 945 | +Deduction guides for freestanding entity class templates are freestanding entities. |
| 946 | + |
| 947 | +\pnum |
| 948 | +Enclosing namespaces of freestanding entities are freestanding entities. |
| 949 | + |
| 950 | +\pnum |
| 951 | +Friends of freestanding entities are freestanding entities. |
| 952 | + |
| 953 | +\pnum |
| 954 | +Entities denoted by freestanding entity \grammarterm{typedef-name}{s} and |
| 955 | +freestanding entity alias templates are freestanding entities. |
| 956 | + |
911 | 957 | \rSec1[requirements]{Library-wide requirements}
|
912 | 958 |
|
913 | 959 | \rSec2[requirements.general]{General}
|
|
1350 | 1396 | \ref{concepts} & Concepts library & \tcode{<concepts>} \\ \rowsep
|
1351 | 1397 | \ref{type.traits} & Type traits & \tcode{<type_traits>} \\ \rowsep
|
1352 | 1398 | \ref{bit} & Bit manipulation & \tcode{<bit>} \\ \rowsep
|
1353 |
| -\ref{atomics} & Atomics & \tcode{<atomic>} \\ |
| 1399 | +\ref{atomics} & Atomics & \tcode{<atomic>} \\ \rowsep |
| 1400 | +\ref{utility} & Utility components & \tcode{<utility>} \\ \rowsep |
| 1401 | +\ref{tuple} & Tuples & \tcode{<tuple>} \\ \rowsep |
| 1402 | +\ref{memory} & Memory & \tcode{<memory>} \\ \rowsep |
| 1403 | +\ref{function.objects} & Function objects & \tcode{<functional>} \\ \rowsep |
| 1404 | +\ref{ratio} & Compile-time rational arithmetic & \tcode{<ratio>} \\ \rowsep |
| 1405 | +\ref{iterators} & Iterators library & \tcode{<iterator>} \\ \rowsep |
| 1406 | +\ref{ranges} & Ranges library & \tcode{<ranges>} \\ |
1354 | 1407 | \end{libsumtab}
|
1355 | 1408 |
|
1356 | 1409 | \pnum
|
1357 |
| -The supplied version of the header \libheaderref{cstdlib} |
1358 |
| -shall declare at least the functions |
1359 |
| -\indexlibraryglobal{abort}% |
1360 |
| -\tcode{abort}, |
1361 |
| -\indexlibraryglobal{atexit}% |
1362 |
| -\tcode{atexit}, |
1363 |
| -\indexlibraryglobal{at_quick_exit}% |
1364 |
| -\tcode{at_quick_exit}, |
1365 |
| -\indexlibraryglobal{exit}% |
1366 |
| -\tcode{exit}, |
1367 |
| -and |
1368 |
| -\indexlibraryglobal{quick_exit}% |
1369 |
| -\tcode{quick_exit}\iref{support.start.term}. |
1370 |
| -\indextext{implementation!hosted}% |
1371 |
| -The supplied version of the header \libheaderrefx{atomic}{atomics.syn} |
1372 |
| -shall meet the same requirements as for a hosted implementation |
1373 |
| -except that support for |
1374 |
| -always lock-free integral atomic types\iref{atomics.lockfree} |
1375 |
| -is \impldef{support for always lock-free integral atomic types in |
1376 |
| -freestanding environments}, and |
1377 |
| -whether or not the type aliases \tcode{atomic_signed_lock_free} and |
1378 |
| -\tcode{atomic_unsigned_lock_free} are defined\iref{atomics.alias} |
1379 |
| -is \impldef{type aliases \tcode{atomic_signed_lock_free} and |
1380 |
| -\tcode{atomic_unsigned_lock_free} in freestanding environments}. |
1381 |
| -The other headers listed in this table |
1382 |
| -shall meet the same requirements as for a hosted implementation. |
| 1410 | +For each of the headers listed in \tref{headers.cpp.fs}, |
| 1411 | +a freestanding implementation provides at least |
| 1412 | +the freestanding entities\iref{freestanding.entity} declared in the header. |
1383 | 1413 | \indextext{implementation!freestanding|)}%
|
1384 | 1414 |
|
| 1415 | +\pnum |
| 1416 | +\begin{note} |
| 1417 | +Throwing a standard library provided exception |
| 1418 | +is not observably different from \tcode{terminate()} |
| 1419 | +if the implementation does not |
| 1420 | +unwind the stack during exception handling\iref{except.handle} and |
| 1421 | +the user's program contains no catch blocks. |
| 1422 | +\end{note} |
| 1423 | + |
1385 | 1424 | \rSec2[using]{Using the library}
|
1386 | 1425 |
|
1387 | 1426 | \rSec3[using.overview]{Overview}
|
|
0 commit comments