Skip to content

Commit dca236a

Browse files
committed
[cstdint, cinttypes.syn] Reorganize <cstdint> presentation
1 parent 6528979 commit dca236a

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
@@ -14952,7 +14952,7 @@
1495214952
\indexlibrary{\idxcode{SCNuPTR}}%
1495314953
\indexlibrary{\idxcode{SCNxPTR}}%
1495414954
\begin{codeblock}
14955-
#include <cstdint>
14955+
#include <cstdint> // see \ref{cstdint}
1495614956

1495714957
namespace std {
1495814958
using imaxdiv_t = @\seebelow@;

source/support.tex

+47-26
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@
11421142

11431143
\rSec1[cstdint]{Integer types}
11441144

1145-
\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis}
1145+
\synopsis{Header \tcode{<cstdint>} synopsis}
11461146
\indextext{\idxhdr{cstdint}}%
11471147
\indexlibrary{\idxhdr{cstdint}}%
11481148
\indexlibrary{\idxcode{int8_t}}%
@@ -1176,10 +1176,10 @@
11761176

11771177
\begin{codeblock}
11781178
namespace std {
1179-
using int8_t = @\textit{signed integer type}@; // optional
1180-
using int16_t = @\textit{signed integer type}@; // optional
1181-
using int32_t = @\textit{signed integer type}@; // optional
1182-
using int64_t = @\textit{signed integer type}@; // optional
1179+
using int8_t = @\textit{signed integer type}@; // optional
1180+
using int16_t = @\textit{signed integer type}@; // optional
1181+
using int32_t = @\textit{signed integer type}@; // optional
1182+
using int64_t = @\textit{signed integer type}@; // optional
11831183

11841184
using int_fast8_t = @\textit{signed integer type}@;
11851185
using int_fast16_t = @\textit{signed integer type}@;
@@ -1192,12 +1192,12 @@
11921192
using int_least64_t = @\textit{signed integer type}@;
11931193

11941194
using intmax_t = @\textit{signed integer type}@;
1195-
using intptr_t = @\textit{signed integer type}@; // optional
1195+
using intptr_t = @\textit{signed integer type}@; // optional
11961196

1197-
using uint8_t = @\textit{unsigned integer type}@; // optional
1198-
using uint16_t = @\textit{unsigned integer type}@; // optional
1199-
using uint32_t = @\textit{unsigned integer type}@; // optional
1200-
using uint64_t = @\textit{unsigned integer type}@; // optional
1197+
using uint8_t = @\textit{unsigned integer type}@; // optional
1198+
using uint16_t = @\textit{unsigned integer type}@; // optional
1199+
using uint32_t = @\textit{unsigned integer type}@; // optional
1200+
using uint64_t = @\textit{unsigned integer type}@; // optional
12011201

12021202
using uint_fast8_t = @\textit{unsigned integer type}@;
12031203
using uint_fast16_t = @\textit{unsigned integer type}@;
@@ -1210,32 +1210,53 @@
12101210
using uint_least64_t = @\textit{unsigned integer type}@;
12111211

12121212
using uintmax_t = @\textit{unsigned integer type}@;
1213-
using uintptr_t = @\textit{unsigned integer type}@; // optional
1214-
} // namespace std
1215-
\end{codeblock}
1213+
using uintptr_t = @\textit{unsigned integer type}@; // optional
1214+
}
12161215

1217-
\pnum
1218-
The header also defines numerous macros of the form:
1216+
#define INT[8, 16, 32, 64]_MIN @\seebelow@ // optional
1217+
#define INT[8, 16, 32, 64]_MAX @\seebelow@ // optional
1218+
#define UINT[8, 16, 32, 64]_MAX @\seebelow@ // optional
12191219

1220-
\begin{codeblock}
1221-
INT_[FAST LEAST]{8 16 32 64}_MIN
1222-
[U]INT_[FAST LEAST]{8 16 32 64}_MAX
1223-
INT{MAX PTR}_MIN
1224-
[U]INT{MAX PTR}_MAX
1225-
{PTRDIFF SIG_ATOMIC WCHAR WINT}{_MAX _MIN}
1226-
SIZE_MAX
1227-
\end{codeblock}
1220+
#define INT_LEAST[8, 16, 32, 64]_MIN @\seebelow@ // optional
1221+
#define INT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ // optional
1222+
#define UINT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ // optional
12281223

1229-
plus function macros of the form:
1224+
#define INT_FAST[8, 16, 32, 64]_MIN @\seebelow@ // optional
1225+
#define INT_FAST[8, 16, 32, 64]_MAX @\seebelow@ // optional
1226+
#define UINT_FAST[8, 16, 32, 64]_MAX @\seebelow@ // optional
12301227

1231-
\begin{codeblock}
1232-
[U]INT{8 16 32 64 MAX}_C
1228+
#define INTPTR_MIN @\seebelow@ // optional
1229+
#define INTPTR_MAX @\seebelow@ // optional
1230+
#define UINTPTR_MAX @\seebelow@ // optional
1231+
1232+
#define INTMAX_MIN @\seebelow@
1233+
#define INTMAX_MAX @\seebelow@
1234+
#define UINTMAX_MAX @\seebelow@
1235+
1236+
#define PTRDIFF_MIN @\seebelow@
1237+
#define PTRDIFF_MAX @\seebelow@
1238+
#define SIG_ATOMIC_MIN @\seebelow@
1239+
#define SIG_ATOMIC_MAX @\seebelow@
1240+
#define SIZE_MAX @\seebelow@
1241+
1242+
#define WCHAR_MIN @\seebelow@
1243+
#define WCHAR_MAX @\seebelow@
1244+
#define WINT_MIN @\seebelow@
1245+
#define WINT_MAX @\seebelow@
1246+
1247+
#define INT[8, 16, 32, 64]_C(value) @\seebelow@ // optional
1248+
#define UINT[8, 16, 32, 64]_C(value) @\seebelow@ // optional
1249+
1250+
#define INTMAX_C(value) @\seebelow@
1251+
#define UINTMAX_C(value) @\seebelow@
12331252
\end{codeblock}
12341253

12351254
\pnum
12361255
The header defines all types and macros the same as
12371256
the C standard library header \tcode{<stdint.h>}.
12381257

1258+
\xref ISO C~7.20.
1259+
12391260
\rSec1[support.start.term]{Start and termination}
12401261

12411262
\pnum

0 commit comments

Comments
 (0)