NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
typeinfo/types.hpp
浏览该文件的文档.
1#ifndef NEFORCE_CORE_TYPEINFO_TYPES_HPP__
2#define NEFORCE_CORE_TYPEINFO_TYPES_HPP__
3
10
12NEFORCE_BEGIN_NAMESPACE__
13
19
24using nullptr_t = decltype(nullptr);
25
30using max_align_t = double;
31
36using byte_t = unsigned char;
37
38
44#ifdef NEFORCE_PLATFORM_WINDOWS
45 unsigned long;
46#else
47 int;
48#endif
49
55#ifdef NEFORCE_PLATFORM_WINDOWS
56 void*;
57#else
58 int;
59#endif
60
61
66using int8_t = signed char;
67
72using int16_t = short;
73
78using int32_t = int;
79
86using int64_t =
87#ifdef NEFORCE_PLATFORM_LINUX64
88 long;
89#else
90 long long;
91#endif
92
97using uint8_t = unsigned char;
98
103using uint16_t = unsigned short;
104
109using uint32_t = unsigned int;
110
117using uint64_t =
118#ifdef NEFORCE_PLATFORM_LINUX64
119 unsigned long;
120#else
121 unsigned long long;
122#endif
123
124
129using float32_t = float;
130
135using float64_t = double;
136
143using decimal_t = long double;
144 // CoreTypes
146
152
153#if defined(NEFORCE_ARCH_BITS_64) || defined(NEXUSFORCE_ENABLE_DOXYGEN)
154
162
170
178
186
194
195#else
196
201using size_t = uint32_t;
202
207using ssize_t = int32_t;
208
213using ptrdiff_t = int32_t;
214
219using intptr_t = int32_t;
220
225using uintptr_t = uint32_t;
226
227#endif
228
229
235
241
247
253
259
265
271
277
283
289
295
301
307
313
319
325
326
332
338 // PlatformDependentTypes
340
348
362struct input_iterator_tag {
363 constexpr explicit input_iterator_tag() = default;
364};
365
378struct output_iterator_tag {
379 constexpr explicit output_iterator_tag() = default;
380};
381
394struct forward_iterator_tag : input_iterator_tag {
395 constexpr explicit forward_iterator_tag() = default;
396};
397
409struct bidirectional_iterator_tag : forward_iterator_tag {
410 constexpr explicit bidirectional_iterator_tag() = default;
411};
412
426struct random_access_iterator_tag : bidirectional_iterator_tag {
427 constexpr explicit random_access_iterator_tag() = default;
428};
429
442struct contiguous_iterator_tag : random_access_iterator_tag {
443 constexpr explicit contiguous_iterator_tag() = default;
444};
445 // IteratorTags
447
455
463struct allocator_arg_tag {
464 constexpr explicit allocator_arg_tag() noexcept = default;
465};
466
473struct default_construct_tag {
474 constexpr explicit default_construct_tag() noexcept = default;
475};
476
483struct exact_arg_construct_tag {
484 constexpr explicit exact_arg_construct_tag() noexcept = default;
485};
486
494struct inplace_construct_tag {
495 constexpr explicit inplace_construct_tag() noexcept = default;
496};
497
504template <typename... Args>
505struct pass_template_construct_tag {
506 constexpr explicit pass_template_construct_tag() noexcept = default;
507};
508
509template <size_t Size>
510struct pass_size_construct_tag {
511 constexpr explicit pass_size_construct_tag() noexcept = default;
512};
513
520struct unpack_utility_construct_tag {
521 constexpr explicit unpack_utility_construct_tag() noexcept = default;
522};
523 // ConstructionTags
525
526struct ignore_t {
527 template <typename T>
528 NEFORCE_CONSTEXPR14 const ignore_t& operator=(const T& /*unused*/) const noexcept {
529 return *this;
530 }
531};
532
533NEFORCE_INLINE17 constexpr ignore_t ignore{};
534
535NEFORCE_END_NAMESPACE__
536#endif // NEFORCE_CORE_TYPEINFO_TYPES_HPP__
核心配置头文件
long int64_t
64位有符号整数类型
unsigned char byte_t
字节类型,定义为无符号字符
float float32_t
32位单精度浮点数类型
double max_align_t
最大对齐类型
unsigned int uint32_t
32位无符号整数类型
unsigned long uint64_t
64位无符号整数类型
unsigned long native_size_type
系统ID类型
long double decimal_t
扩展精度浮点数类型
unsigned char uint8_t
8位无符号整数类型
int int32_t
32位有符号整数类型
double float64_t
64位双精度浮点数类型
void * native_handle_type
系统句柄类型
unsigned short uint16_t
16位无符号整数类型
short int16_t
16位有符号整数类型
decltype(nullptr) nullptr_t
空指针类型
signed char int8_t
8位有符号整数类型
int32_t int_least32_t
至少32位的有符号整数类型
uint8_t uint_least8_t
至少8位的无符号整数类型
uint64_t uint_fast64_t
快速64位无符号整数类型
uint64_t size_t
无符号大小类型
size_t uint_fast32_t
快速32位无符号整数类型
uint16_t uint_least16_t
至少16位的无符号整数类型
int8_t int_least8_t
至少8位的有符号整数类型
int64_t int_least64_t
至少64位的有符号整数类型
uint64_t uintmax_t
最大无符号整数类型
uint8_t uint_fast8_t
快速8位无符号整数类型
int64_t intptr_t
可容纳指针的有符号整数类型
uint64_t uintptr_t
可容纳指针的无符号整数类型
int8_t int_fast8_t
快速8位有符号整数类型
ssize_t int_fast16_t
快速16位有符号整数类型
int64_t int_fast64_t
快速64位有符号整数类型
int64_t ptrdiff_t
指针差类型
int16_t int_least16_t
至少16位的有符号整数类型
uint32_t uint_least32_t
至少32位的无符号整数类型
uint64_t uint_least64_t
至少64位的无符号整数类型
size_t uint_fast16_t
快速16位无符号整数类型
ssize_t int_fast32_t
快速32位有符号整数类型
int64_t ssize_t
有符号大小类型
int64_t intmax_t
最大有符号整数类型