MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
types.hpp
浏览该文件的文档.
1#ifndef MSTL_CORE_TYPEINFO_TYPES_HPP__
2#define MSTL_CORE_TYPEINFO_TYPES_HPP__
3
10
12
18
24
29using nullptr_t = decltype(nullptr);
30
35using max_align_t = double;
36
41using byte_t = unsigned char;
42
43
48using int8_t = signed char;
49
54using int16_t = short;
55
60using int32_t = int;
61
68using int64_t =
69#ifdef MSTL_PLATFORM_LINUX64__
70 long;
71#else
72 long long;
73#endif
74
79using uint8_t = unsigned char;
80
85using uint16_t = unsigned short;
86
91using uint32_t = unsigned int;
92
99using uint64_t =
100#ifdef MSTL_PLATFORM_LINUX64__
101 unsigned long;
102#else
103 unsigned long long;
104#endif
105
106
111using float32_t = float;
112
117using float64_t = double;
118
125using decimal_t = long double;
126 // CoreTypes
128
134
135#if defined(MSTL_DATA_BUS_WIDTH_64__) || defined(MSTL_DOXYGEN_GENERATE)
136
144
152
160
168
176
177#else
178
183using size_t = uint32_t;
184
189using ssize_t = int32_t;
190
195using ptrdiff_t = int32_t;
196
201using intptr_t = int32_t;
202
207using uintptr_t = uint32_t;
208
209#endif
210
211
217
223
229
235
241
247
253
259
265
271
277
283
289
295
301
307
308
314
320
321
336#define MSTL_BUILD_TYPE_ALIAS(TYPE) \
337using value_type = TYPE; \
338using pointer = TYPE*; \
339using reference = TYPE&; \
340using const_pointer = const TYPE*; \
341using const_reference = const TYPE&; \
342using size_type = size_t; \
343using difference_type = ptrdiff_t;
344 // PlatformDependentTypes
346
354
368struct input_iterator_tag {
369 constexpr explicit input_iterator_tag() = default;
370};
371
384struct output_iterator_tag {
385 constexpr explicit output_iterator_tag() = default;
386};
387
401struct forward_iterator_tag : input_iterator_tag {
402 constexpr explicit forward_iterator_tag() = default;
403};
404
417struct bidirectional_iterator_tag : forward_iterator_tag {
418 constexpr explicit bidirectional_iterator_tag() = default;
419};
420
435struct random_access_iterator_tag : bidirectional_iterator_tag {
436 constexpr explicit random_access_iterator_tag() = default;
437};
438
452struct contiguous_iterator_tag : random_access_iterator_tag {
453 constexpr explicit contiguous_iterator_tag() = default;
454};
455 // IteratorTags
457
465
473struct allocator_arg_tag {
474 constexpr explicit allocator_arg_tag() noexcept = default;
475};
476
483struct default_construct_tag {
484 constexpr explicit default_construct_tag() noexcept = default;
485};
486
493struct exact_arg_construct_tag {
494 constexpr explicit exact_arg_construct_tag() noexcept = default;
495};
496
504struct inplace_construct_tag {
505 constexpr explicit inplace_construct_tag() noexcept = default;
506};
507
514struct unpack_utility_construct_tag {
515 constexpr explicit unpack_utility_construct_tag() noexcept = default;
516};
517 // ConstructionTags
519
521#endif // MSTL_CORE_TYPEINFO_TYPES_HPP__
MSTL核心配置
unsigned char uint8_t
8位无符号整数类型
unsigned char byte_t
字节类型,定义为无符号字符
float float32_t
32位单精度浮点数类型
unsigned int uint32_t
32位无符号整数类型
long double decimal_t
扩展精度浮点数类型
long long int64_t
64位有符号整数类型
double float64_t
64位双精度浮点数类型
unsigned short uint16_t
16位无符号整数类型
double max_align_t
最大对齐类型
unsigned long long uint64_t
64位无符号整数类型
short int16_t
16位有符号整数类型
int int32_t
32位有符号整数类型
signed char int8_t
8位有符号整数类型
decltype(nullptr) nullptr_t
空指针类型
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL
ssize_t int_fast16_t
快速16位有符号整数类型
int64_t intmax_t
最大有符号整数类型
uint64_t size_t
无符号大小类型
int64_t ssize_t
有符号大小类型
int64_t intptr_t
可容纳指针的有符号整数类型
uint64_t uint_least64_t
至少64位的无符号整数类型
ssize_t int_fast32_t
快速32位有符号整数类型
uint64_t uintptr_t
可容纳指针的无符号整数类型
int32_t int_least32_t
至少32位的有符号整数类型
uint8_t uint_least8_t
至少8位的无符号整数类型
uint64_t uint_fast64_t
快速64位无符号整数类型
int16_t int_least16_t
至少16位的有符号整数类型
int8_t int_least8_t
至少8位的有符号整数类型
uint16_t uint_least16_t
至少16位的无符号整数类型
uint8_t uint_fast8_t
快速8位无符号整数类型
size_t uint_fast32_t
快速32位无符号整数类型
uint64_t uintmax_t
最大无符号整数类型
int64_t ptrdiff_t
指针差类型
uint32_t uint_least32_t
至少32位的无符号整数类型
int8_t int_fast8_t
快速8位有符号整数类型
size_t uint_fast16_t
快速16位无符号整数类型
int64_t int_least64_t
至少64位的有符号整数类型
int64_t int_fast64_t
快速64位有符号整数类型