diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-05-26 00:47:54 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-05-26 00:48:06 +0200 |
commit | a1db1cd9e22e77041d5f1360f1d1ccdc52b86306 (patch) | |
tree | c1cc6dc9c17885a0789028f7a55c7126f33beee7 /asl/base/meta.hpp | |
parent | 54b95b16629f0cd4bc30e6899e00019b3ab94012 (diff) |
Implement chunked_buffer
Diffstat (limited to 'asl/base/meta.hpp')
-rw-r--r-- | asl/base/meta.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/asl/base/meta.hpp b/asl/base/meta.hpp index e050e69..b17d761 100644 --- a/asl/base/meta.hpp +++ b/asl/base/meta.hpp @@ -249,28 +249,32 @@ template<> struct _integer_traits<uint8_t> { static constexpr bool kSigned = false; static constexpr bool kUnsigned = true; - using as_signed = int8_t; + using as_signed = int8_t; + using as_unsigned = uint8_t; }; template<> struct _integer_traits<uint16_t> { static constexpr bool kSigned = false; static constexpr bool kUnsigned = true; - using as_signed = int16_t; + using as_signed = int16_t; + using as_unsigned = uint16_t; }; template<> struct _integer_traits<uint32_t> { static constexpr bool kSigned = false; static constexpr bool kUnsigned = true; - using as_signed = int32_t; + using as_signed = int32_t; + using as_unsigned = uint32_t; }; template<> struct _integer_traits<uint64_t> { static constexpr bool kSigned = false; static constexpr bool kUnsigned = true; - using as_signed = int64_t; + using as_signed = int64_t; + using as_unsigned = uint64_t; }; template<> struct _integer_traits<int8_t> @@ -278,6 +282,7 @@ template<> struct _integer_traits<int8_t> static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint8_t; + using as_signed = int8_t; }; template<> struct _integer_traits<int16_t> @@ -285,6 +290,7 @@ template<> struct _integer_traits<int16_t> static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint16_t; + using as_signed = int16_t; }; template<> struct _integer_traits<int32_t> @@ -292,6 +298,7 @@ template<> struct _integer_traits<int32_t> static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint32_t; + using as_signed = int32_t; }; template<> struct _integer_traits<int64_t> @@ -299,6 +306,7 @@ template<> struct _integer_traits<int64_t> static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint64_t; + using as_signed = int64_t; }; template<typename T> concept is_signed_integer = _integer_traits<T>::kSigned; @@ -306,8 +314,8 @@ template<typename T> concept is_unsigned_integer = _integer_traits<T>::kUnsigned template<typename T> concept is_integer = is_signed_integer<T> || is_unsigned_integer<T>; -template<is_signed_integer T> using as_unsigned_integer = _integer_traits<T>::as_unsigned; -template<is_unsigned_integer T> using as_signed_integer = _integer_traits<T>::as_signed; +template<is_integer T> using as_unsigned_integer = _integer_traits<T>::as_unsigned; +template<is_integer T> using as_signed_integer = _integer_traits<T>::as_signed; template<typename T> concept is_enum = __is_enum(T); |