feat(miscellaneous): add fixed-length floating-point support
This commit is contained in:
parent
0ce3d9055b
commit
1dd42be86a
@ -140,41 +140,46 @@ NAMESPACE_MODULE_BEGIN(Utility)
|
|||||||
# define PRAGMA_ENABLE_OPTIMIZATION PRAGMA_ENABLE_OPTIMIZATION_ACTUAL
|
# define PRAGMA_ENABLE_OPTIMIZATION PRAGMA_ENABLE_OPTIMIZATION_ACTUAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Unsigned base types
|
// Unsigned integral types
|
||||||
|
|
||||||
typedef NAMESPACE_STD::uint8_t uint8;
|
using uint8 = NAMESPACE_STD::uint8_t;
|
||||||
typedef NAMESPACE_STD::uint16_t uint16;
|
using uint16 = NAMESPACE_STD::uint16_t;
|
||||||
typedef NAMESPACE_STD::uint32_t uint32;
|
using uint32 = NAMESPACE_STD::uint32_t;
|
||||||
typedef NAMESPACE_STD::uint64_t uint64;
|
using uint64 = NAMESPACE_STD::uint64_t;
|
||||||
|
|
||||||
// Signed base types
|
// Signed integral types
|
||||||
|
|
||||||
typedef NAMESPACE_STD::int8_t int8;
|
using int8 = NAMESPACE_STD::int8_t;
|
||||||
typedef NAMESPACE_STD::int16_t int16;
|
using int16 = NAMESPACE_STD::int16_t;
|
||||||
typedef NAMESPACE_STD::int32_t int32;
|
using int32 = NAMESPACE_STD::int32_t;
|
||||||
typedef NAMESPACE_STD::int64_t int64;
|
using int64 = NAMESPACE_STD::int64_t;
|
||||||
|
|
||||||
|
// Floating point types
|
||||||
|
|
||||||
|
using float32 = float;
|
||||||
|
using float64 = double;
|
||||||
|
|
||||||
// Character types
|
// Character types
|
||||||
|
|
||||||
typedef char chara;
|
using chara = char;
|
||||||
typedef wchar_t charw;
|
using charw = wchar_t;
|
||||||
typedef charw chart;
|
using chart = charw;
|
||||||
typedef char8_t char8;
|
using char8 = char8_t;
|
||||||
typedef char16_t char16;
|
using char16 = char16_t;
|
||||||
typedef char32_t char32;
|
using char32 = char32_t;
|
||||||
|
|
||||||
// Pointer types
|
// Pointer types
|
||||||
|
|
||||||
typedef NAMESPACE_STD::uintptr_t uintptr;
|
using uintptr = NAMESPACE_STD::uintptr_t;
|
||||||
typedef NAMESPACE_STD::intptr_t intptr;
|
using intptr = NAMESPACE_STD::intptr_t;
|
||||||
typedef NAMESPACE_STD::ptrdiff_t ptrdiff;
|
using ptrdiff = NAMESPACE_STD::ptrdiff_t;
|
||||||
typedef NAMESPACE_STD::size_t size_t;
|
using size_t = NAMESPACE_STD::size_t;
|
||||||
typedef intptr_t ssize_t;
|
using ssize_t = intptr_t;
|
||||||
|
|
||||||
// Null types
|
// Null types
|
||||||
|
|
||||||
typedef decltype(NULL) null_t;
|
using null_t = decltype(NULL);
|
||||||
typedef NAMESPACE_STD::nullptr_t nullptr_t;
|
using nullptr_t = NAMESPACE_STD::nullptr_t;
|
||||||
|
|
||||||
#if PLATFORM_LINUX
|
#if PLATFORM_LINUX
|
||||||
# define PLATFORM_TCHAR_IS_CHAR16 1
|
# define PLATFORM_TCHAR_IS_CHAR16 1
|
||||||
|
Loading…
Reference in New Issue
Block a user