|
1306 | 1306 |
|
1307 | 1307 | \rSec1[cstdint]{Integer types}
|
1308 | 1308 |
|
1309 |
| -\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis} |
| 1309 | +\synopsis{Header \tcode{<cstdint>} synopsis} |
1310 | 1310 | \indextext{\idxhdr{cstdint}}%
|
1311 | 1311 | \indexlibrary{\idxhdr{cstdint}}%
|
1312 | 1312 | \indexlibrary{\idxcode{int8_t}}%
|
|
1340 | 1340 |
|
1341 | 1341 | \begin{codeblock}
|
1342 | 1342 | namespace std {
|
1343 |
| - using int8_t = @\textit{signed integer type}@; // optional |
1344 |
| - using int16_t = @\textit{signed integer type}@; // optional |
1345 |
| - using int32_t = @\textit{signed integer type}@; // optional |
1346 |
| - using int64_t = @\textit{signed integer type}@; // optional |
| 1343 | + using int8_t = @\textit{signed integer type}@; // optional |
| 1344 | + using int16_t = @\textit{signed integer type}@; // optional |
| 1345 | + using int32_t = @\textit{signed integer type}@; // optional |
| 1346 | + using int64_t = @\textit{signed integer type}@; // optional |
1347 | 1347 |
|
1348 | 1348 | using int_fast8_t = @\textit{signed integer type}@;
|
1349 | 1349 | using int_fast16_t = @\textit{signed integer type}@;
|
|
1356 | 1356 | using int_least64_t = @\textit{signed integer type}@;
|
1357 | 1357 |
|
1358 | 1358 | using intmax_t = @\textit{signed integer type}@;
|
1359 |
| - using intptr_t = @\textit{signed integer type}@; // optional |
| 1359 | + using intptr_t = @\textit{signed integer type}@; // optional |
1360 | 1360 |
|
1361 |
| - using uint8_t = @\textit{unsigned integer type}@; // optional |
1362 |
| - using uint16_t = @\textit{unsigned integer type}@; // optional |
1363 |
| - using uint32_t = @\textit{unsigned integer type}@; // optional |
1364 |
| - using uint64_t = @\textit{unsigned integer type}@; // optional |
| 1361 | + using uint8_t = @\textit{unsigned integer type}@; // optional |
| 1362 | + using uint16_t = @\textit{unsigned integer type}@; // optional |
| 1363 | + using uint32_t = @\textit{unsigned integer type}@; // optional |
| 1364 | + using uint64_t = @\textit{unsigned integer type}@; // optional |
1365 | 1365 |
|
1366 | 1366 | using uint_fast8_t = @\textit{unsigned integer type}@;
|
1367 | 1367 | using uint_fast16_t = @\textit{unsigned integer type}@;
|
|
1374 | 1374 | using uint_least64_t = @\textit{unsigned integer type}@;
|
1375 | 1375 |
|
1376 | 1376 | using uintmax_t = @\textit{unsigned integer type}@;
|
1377 |
| - using uintptr_t = @\textit{unsigned integer type}@; // optional |
1378 |
| -} // namespace std |
1379 |
| -\end{codeblock} |
| 1377 | + using uintptr_t = @\textit{unsigned integer type}@; // optional |
| 1378 | +} |
1380 | 1379 |
|
1381 |
| -\pnum |
1382 |
| -The header also defines numerous macros of the form: |
| 1380 | +#define INT[8, 16, 32, 64]_MIN @\seebelow@ // optional |
| 1381 | +#define INT[8, 16, 32, 64]_MAX @\seebelow@ // optional |
| 1382 | +#define UINT[8, 16, 32, 64]_MAX @\seebelow@ // optional |
1383 | 1383 |
|
1384 |
| -\begin{codeblock} |
1385 |
| - INT_[FAST LEAST]{8 16 32 64}_MIN |
1386 |
| - [U]INT_[FAST LEAST]{8 16 32 64}_MAX |
1387 |
| - INT{MAX PTR}_MIN |
1388 |
| - [U]INT{MAX PTR}_MAX |
1389 |
| - {PTRDIFF SIG_ATOMIC WCHAR WINT}{_MAX _MIN} |
1390 |
| - SIZE_MAX |
1391 |
| -\end{codeblock} |
| 1384 | +#define INT_LEAST[8, 16, 32, 64]_MIN @\seebelow@ |
| 1385 | +#define INT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ |
| 1386 | +#define UINT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ |
1392 | 1387 |
|
1393 |
| -plus function macros of the form: |
| 1388 | +#define INT_FAST[8, 16, 32, 64]_MIN @\seebelow@ |
| 1389 | +#define INT_FAST[8, 16, 32, 64]_MAX @\seebelow@ |
| 1390 | +#define UINT_FAST[8, 16, 32, 64]_MAX @\seebelow@ |
1394 | 1391 |
|
1395 |
| -\begin{codeblock} |
1396 |
| - [U]INT{8 16 32 64 MAX}_C |
| 1392 | +#define INTPTR_MIN @\seebelow@ // optional |
| 1393 | +#define INTPTR_MAX @\seebelow@ // optional |
| 1394 | +#define UINTPTR_MAX @\seebelow@ // optional |
| 1395 | + |
| 1396 | +#define INTMAX_MIN @\seebelow@ |
| 1397 | +#define INTMAX_MAX @\seebelow@ |
| 1398 | +#define UINTMAX_MAX @\seebelow@ |
| 1399 | + |
| 1400 | +#define PTRDIFF_MIN @\seebelow@ |
| 1401 | +#define PTRDIFF_MAX @\seebelow@ |
| 1402 | +#define SIG_ATOMIC_MIN @\seebelow@ |
| 1403 | +#define SIG_ATOMIC_MAX @\seebelow@ |
| 1404 | +#define SIZE_MAX @\seebelow@ |
| 1405 | + |
| 1406 | +#define WCHAR_MIN @\seebelow@ |
| 1407 | +#define WCHAR_MAX @\seebelow@ |
| 1408 | +#define WINT_MIN @\seebelow@ |
| 1409 | +#define WINT_MAX @\seebelow@ |
| 1410 | + |
| 1411 | +#define INT[8, 16, 32, 64]_C(value) @\seebelow@ // optional |
| 1412 | +#define UINT[8, 16, 32, 64]_C(value) @\seebelow@ // optional |
| 1413 | + |
| 1414 | +#define INTMAX_C(value) @\seebelow@ |
| 1415 | +#define UINTMAX_C(value) @\seebelow@ |
1397 | 1416 | \end{codeblock}
|
1398 | 1417 |
|
1399 | 1418 | \pnum
|
1400 | 1419 | The header defines all types and macros the same as
|
1401 | 1420 | the C standard library header \tcode{<stdint.h>}.
|
1402 | 1421 |
|
| 1422 | +\xref ISO C~7.20. |
| 1423 | + |
1403 | 1424 | \rSec1[support.start.term]{Start and termination}
|
1404 | 1425 |
|
1405 | 1426 | \pnum
|
|
0 commit comments