|
1142 | 1142 |
|
1143 | 1143 | \rSec1[cstdint]{Integer types}
|
1144 | 1144 |
|
1145 |
| -\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis} |
| 1145 | +\synopsis{Header \tcode{<cstdint>} synopsis} |
1146 | 1146 | \indextext{\idxhdr{cstdint}}%
|
1147 | 1147 | \indexlibrary{\idxhdr{cstdint}}%
|
1148 | 1148 | \indexlibrary{\idxcode{int8_t}}%
|
|
1176 | 1176 |
|
1177 | 1177 | \begin{codeblock}
|
1178 | 1178 | 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 |
1183 | 1183 |
|
1184 | 1184 | using int_fast8_t = @\textit{signed integer type}@;
|
1185 | 1185 | using int_fast16_t = @\textit{signed integer type}@;
|
|
1192 | 1192 | using int_least64_t = @\textit{signed integer type}@;
|
1193 | 1193 |
|
1194 | 1194 | 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 |
1196 | 1196 |
|
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 |
1201 | 1201 |
|
1202 | 1202 | using uint_fast8_t = @\textit{unsigned integer type}@;
|
1203 | 1203 | using uint_fast16_t = @\textit{unsigned integer type}@;
|
|
1210 | 1210 | using uint_least64_t = @\textit{unsigned integer type}@;
|
1211 | 1211 |
|
1212 | 1212 | 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 | +} |
1216 | 1215 |
|
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 |
1219 | 1219 |
|
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@ |
| 1221 | +#define INT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ |
| 1222 | +#define UINT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ |
1228 | 1223 |
|
1229 |
| -plus function macros of the form: |
| 1224 | +#define INT_FAST[8, 16, 32, 64]_MIN @\seebelow@ |
| 1225 | +#define INT_FAST[8, 16, 32, 64]_MAX @\seebelow@ |
| 1226 | +#define UINT_FAST[8, 16, 32, 64]_MAX @\seebelow@ |
1230 | 1227 |
|
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@ |
1233 | 1252 | \end{codeblock}
|
1234 | 1253 |
|
1235 | 1254 | \pnum
|
1236 | 1255 | The header defines all types and macros the same as
|
1237 | 1256 | the C standard library header \tcode{<stdint.h>}.
|
1238 | 1257 |
|
| 1258 | +\xref ISO C~7.20. |
| 1259 | + |
1239 | 1260 | \rSec1[support.start.term]{Start and termination}
|
1240 | 1261 |
|
1241 | 1262 | \pnum
|
|
0 commit comments