tmp/tmp1xkq3o5g/{from.md → to.md}
RENAMED
|
@@ -1,64 +1,107 @@
|
|
| 1 |
### Header `<cstdint>` synopsis <a id="cstdint.syn">[[cstdint.syn]]</a>
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
``` cpp
|
|
|
|
| 4 |
namespace std {
|
| 5 |
using int8_t = signed integer type; // optional
|
| 6 |
using int16_t = signed integer type; // optional
|
| 7 |
using int32_t = signed integer type; // optional
|
| 8 |
using int64_t = signed integer type; // optional
|
|
|
|
| 9 |
|
| 10 |
using int_fast8_t = signed integer type;
|
| 11 |
using int_fast16_t = signed integer type;
|
| 12 |
using int_fast32_t = signed integer type;
|
| 13 |
using int_fast64_t = signed integer type;
|
|
|
|
| 14 |
|
| 15 |
using int_least8_t = signed integer type;
|
| 16 |
using int_least16_t = signed integer type;
|
| 17 |
using int_least32_t = signed integer type;
|
| 18 |
using int_least64_t = signed integer type;
|
|
|
|
| 19 |
|
| 20 |
using intmax_t = signed integer type;
|
| 21 |
using intptr_t = signed integer type; // optional
|
| 22 |
|
| 23 |
using uint8_t = unsigned integer type; // optional
|
| 24 |
using uint16_t = unsigned integer type; // optional
|
| 25 |
using uint32_t = unsigned integer type; // optional
|
| 26 |
using uint64_t = unsigned integer type; // optional
|
|
|
|
| 27 |
|
| 28 |
using uint_fast8_t = unsigned integer type;
|
| 29 |
using uint_fast16_t = unsigned integer type;
|
| 30 |
using uint_fast32_t = unsigned integer type;
|
| 31 |
using uint_fast64_t = unsigned integer type;
|
|
|
|
| 32 |
|
| 33 |
using uint_least8_t = unsigned integer type;
|
| 34 |
using uint_least16_t = unsigned integer type;
|
| 35 |
using uint_least32_t = unsigned integer type;
|
| 36 |
using uint_least64_t = unsigned integer type;
|
|
|
|
| 37 |
|
| 38 |
using uintmax_t = unsigned integer type;
|
| 39 |
using uintptr_t = unsigned integer type; // optional
|
| 40 |
}
|
| 41 |
-
```
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
INT{MAX PTR}_MIN
|
| 49 |
-
[U]INT{MAX PTR}_MAX
|
| 50 |
-
{PTRDIFF SIG_ATOMIC WCHAR WINT}{_MAX _MIN}
|
| 51 |
-
SIZE_MAX
|
| 52 |
-
```
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
```
|
| 59 |
|
| 60 |
The header defines all types and macros the same as the C standard
|
| 61 |
library header `<stdint.h>`.
|
| 62 |
|
| 63 |
See also: ISO C 7.20
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
### Header `<cstdint>` synopsis <a id="cstdint.syn">[[cstdint.syn]]</a>
|
| 2 |
|
| 3 |
+
The header `<cstdint>` supplies integer types having specified widths,
|
| 4 |
+
and macros that specify limits of integer types.
|
| 5 |
+
|
| 6 |
``` cpp
|
| 7 |
+
// all freestanding
|
| 8 |
namespace std {
|
| 9 |
using int8_t = signed integer type; // optional
|
| 10 |
using int16_t = signed integer type; // optional
|
| 11 |
using int32_t = signed integer type; // optional
|
| 12 |
using int64_t = signed integer type; // optional
|
| 13 |
+
using intN_t = see below; // optional
|
| 14 |
|
| 15 |
using int_fast8_t = signed integer type;
|
| 16 |
using int_fast16_t = signed integer type;
|
| 17 |
using int_fast32_t = signed integer type;
|
| 18 |
using int_fast64_t = signed integer type;
|
| 19 |
+
using int_fastN_t = see below; // optional
|
| 20 |
|
| 21 |
using int_least8_t = signed integer type;
|
| 22 |
using int_least16_t = signed integer type;
|
| 23 |
using int_least32_t = signed integer type;
|
| 24 |
using int_least64_t = signed integer type;
|
| 25 |
+
using int_leastN_t = see below; // optional
|
| 26 |
|
| 27 |
using intmax_t = signed integer type;
|
| 28 |
using intptr_t = signed integer type; // optional
|
| 29 |
|
| 30 |
using uint8_t = unsigned integer type; // optional
|
| 31 |
using uint16_t = unsigned integer type; // optional
|
| 32 |
using uint32_t = unsigned integer type; // optional
|
| 33 |
using uint64_t = unsigned integer type; // optional
|
| 34 |
+
using uintN_t = see below; // optional
|
| 35 |
|
| 36 |
using uint_fast8_t = unsigned integer type;
|
| 37 |
using uint_fast16_t = unsigned integer type;
|
| 38 |
using uint_fast32_t = unsigned integer type;
|
| 39 |
using uint_fast64_t = unsigned integer type;
|
| 40 |
+
using uint_fastN_t = see below; // optional
|
| 41 |
|
| 42 |
using uint_least8_t = unsigned integer type;
|
| 43 |
using uint_least16_t = unsigned integer type;
|
| 44 |
using uint_least32_t = unsigned integer type;
|
| 45 |
using uint_least64_t = unsigned integer type;
|
| 46 |
+
using uint_leastN_t = see below; // optional
|
| 47 |
|
| 48 |
using uintmax_t = unsigned integer type;
|
| 49 |
using uintptr_t = unsigned integer type; // optional
|
| 50 |
}
|
|
|
|
| 51 |
|
| 52 |
+
#define INTN_MIN see below
|
| 53 |
+
#define INTN_MAX see below
|
| 54 |
+
#define UINTN_MAX see below
|
| 55 |
|
| 56 |
+
#define INT_FASTN_MIN see below
|
| 57 |
+
#define INT_FASTN_MAX see below
|
| 58 |
+
#define UINT_FASTN_MAX see below
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
#define INT_LEASTN_MIN see below
|
| 61 |
+
#define INT_LEASTN_MAX see below
|
| 62 |
+
#define UINT_LEASTN_MAX see below
|
| 63 |
|
| 64 |
+
#define INTMAX_MIN see below
|
| 65 |
+
#define INTMAX_MAX see below
|
| 66 |
+
#define UINTMAX_MAX see below
|
| 67 |
+
|
| 68 |
+
#define INTPTR_MIN see below // optional
|
| 69 |
+
#define INTPTR_MAX see below // optional
|
| 70 |
+
#define UINTPTR_MAX see below // optional
|
| 71 |
+
|
| 72 |
+
#define PTRDIFF_MIN see below
|
| 73 |
+
#define PTRDIFF_MAX see below
|
| 74 |
+
#define SIZE_MAX see below
|
| 75 |
+
|
| 76 |
+
#define SIG_ATOMIC_MIN see below
|
| 77 |
+
#define SIG_ATOMIC_MAX see below
|
| 78 |
+
|
| 79 |
+
#define WCHAR_MIN see below
|
| 80 |
+
#define WCHAR_MAX see below
|
| 81 |
+
|
| 82 |
+
#define WINT_MIN see below
|
| 83 |
+
#define WINT_MAX see below
|
| 84 |
+
|
| 85 |
+
#define INTN_C(value) see below
|
| 86 |
+
#define UINTN_C(value) see below
|
| 87 |
+
#define INTMAX_C(value) see below
|
| 88 |
+
#define UINTMAX_C(value) see below
|
| 89 |
```
|
| 90 |
|
| 91 |
The header defines all types and macros the same as the C standard
|
| 92 |
library header `<stdint.h>`.
|
| 93 |
|
| 94 |
See also: ISO C 7.20
|
| 95 |
|
| 96 |
+
All types that use the placeholder *N* are optional when *N* is not `8`,
|
| 97 |
+
`16`, `32`, or `64`. The exact-width types `intN_t` and `uintN_t` for
|
| 98 |
+
*N* = `8`, `16`, `32`, and `64` are also optional; however, if an
|
| 99 |
+
implementation defines integer types with the corresponding width and no
|
| 100 |
+
padding bits, it defines the corresponding *typedef-name*s. Each of the
|
| 101 |
+
macros listed in this subclause is defined if and only if the
|
| 102 |
+
implementation defines the corresponding *typedef-name*.
|
| 103 |
+
|
| 104 |
+
[*Note 1*: The macros `INTN_C` and `UINTN_C` correspond to the
|
| 105 |
+
*typedef-name*s `int_leastN_t` and `uint_leastN_t`,
|
| 106 |
+
respectively. — *end note*]
|
| 107 |
+
|