Skip to content

Commit 342b592

Browse files
committed
[cstdint, cinttypes.syn] Reorganize <cstdint> presentation
1 parent 6233e94 commit 342b592

File tree

2 files changed

+48
-27
lines changed

2 files changed

+48
-27
lines changed

source/iostreams.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -14967,7 +14967,7 @@
1496714967
\indexlibrary{\idxcode{SCNuPTR}}%
1496814968
\indexlibrary{\idxcode{SCNxPTR}}%
1496914969
\begin{codeblock}
14970-
#include <cstdint>
14970+
#include <cstdint> // see \ref{cstdint}
1497114971

1497214972
namespace std {
1497314973
using imaxdiv_t = @\seebelow@;

source/support.tex

+47-26
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@
13061306

13071307
\rSec1[cstdint]{Integer types}
13081308

1309-
\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis}
1309+
\synopsis{Header \tcode{<cstdint>} synopsis}
13101310
\indextext{\idxhdr{cstdint}}%
13111311
\indexlibrary{\idxhdr{cstdint}}%
13121312
\indexlibrary{\idxcode{int8_t}}%
@@ -1340,10 +1340,10 @@
13401340

13411341
\begin{codeblock}
13421342
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
13471347

13481348
using int_fast8_t = @\textit{signed integer type}@;
13491349
using int_fast16_t = @\textit{signed integer type}@;
@@ -1356,12 +1356,12 @@
13561356
using int_least64_t = @\textit{signed integer type}@;
13571357

13581358
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
13601360

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
13651365

13661366
using uint_fast8_t = @\textit{unsigned integer type}@;
13671367
using uint_fast16_t = @\textit{unsigned integer type}@;
@@ -1374,32 +1374,53 @@
13741374
using uint_least64_t = @\textit{unsigned integer type}@;
13751375

13761376
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+
}
13801379

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
13831383

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@
13921387

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@
13941391

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@
13971416
\end{codeblock}
13981417

13991418
\pnum
14001419
The header defines all types and macros the same as
14011420
the C standard library header \tcode{<stdint.h>}.
14021421

1422+
\xref ISO C~7.20.
1423+
14031424
\rSec1[support.start.term]{Start and termination}
14041425

14051426
\pnum

0 commit comments

Comments
 (0)