xtd 0.2.0
types.h
Go to the documentation of this file.
1 #pragma once
5 #include "core_export.h"
7 #define __XTD_VALUE_TYPE_NATIVE__
8 #include <xtd/native/value_types>
9 #undef __XTD_VALUE_TYPE_NATIVE__
10 #include <cstdint>
12 #include <string>
13 #include <typeinfo>
14 
16 namespace xtd {
18 
29  using bool_ = bool;
39  using byte = uint_least8_t;
50  using char_ = char;
51 
52 #if defined(__cpp_lib_char8_t)
53  using char8 = char8_t;
63 #endif
64 
74  using char16 = char16_t;
75 
85  using char32 = char32_t;
86 
96  using decimal = long double;
97 
107  using double_ = double;
108 
118  using int16 = int_least16_t;
119 
129  using int32 = int_least32_t;
130 
140  using int64 = int_least64_t;
141 
151  using intptr = intmax_t;
152 
162  using ptrdiff = std::ptrdiff_t;
163 
173  using sbyte = int_least8_t;
174 
184  using single = float;
185 
195  using size = size_t;
196 
206  using slong = __slong__; // Workaround: On linux 64 bits unfortunately 'int_least64_t' is an alias on 'long' and not on 'long long int' as other platforms. In order to avoid conflicts in operator or method overloads, it is necessary to give the type that is not taken into account.
207 
217  using type = std::type_info;
218 
228  using uint16 = uint_least16_t;
229 
239  using uint32 = uint_least32_t;
240 
250  using uint64 = uint_least64_t;
251 
261  using uintptr = uintmax_t;
262 
272  using ulong = __ulong__; // Workaround: On linux 64 bits unfortunately 'uint_least64_t' is an alias on 'unigned long' and not on 'unsigned long long int' as other platforms. In order to avoid conflicts in operator or method overloads, it is necessary to give the type that is not taken into account.
273 
284  using wchar = wchar_t;
286 
301  extern core_export_ std::nullptr_t null;
302 }
float single
Represents a single-precision floating-point number.
Definition: types.h:184
char char_
Represents a character.
Definition: types.h:50
std::type_info type
Stores information about a type.
Definition: types.h:217
std::ptrdiff_t ptrdiff
Represent the signed integer type of the result of subtracting two pointers.
Definition: types.h:162
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition: types.h:173
long double decimal
Represents a decimal-precision floating-point number.
Definition: types.h:96
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
std::nullptr_t null
Represents a null pointer value.
double double_
Represents a double-precision floating-point number.
Definition: types.h:107
uintmax_t uintptr
Represent a pointer or a handle.
Definition: types.h:261
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition: types.h:206
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition: types.h:272
bool bool_
Represents a boolean.
Definition: types.h:29
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
char8_t char8
Represents a 8-bit unicode character.
Definition: types.h:62
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
size_t size
Represents a size of any object in bytes.
Definition: types.h:195
wchar_t wchar
Represents a wide character.
Definition: types.h:284