From a1db1cd9e22e77041d5f1360f1d1ccdc52b86306 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Mon, 26 May 2025 00:47:54 +0200 Subject: Implement chunked_buffer --- asl/base/meta.hpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'asl/base/meta.hpp') 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 { 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 { 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 { 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 { 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 @@ -278,6 +282,7 @@ template<> struct _integer_traits static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint8_t; + using as_signed = int8_t; }; template<> struct _integer_traits @@ -285,6 +290,7 @@ template<> struct _integer_traits static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint16_t; + using as_signed = int16_t; }; template<> struct _integer_traits @@ -292,6 +298,7 @@ template<> struct _integer_traits static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint32_t; + using as_signed = int32_t; }; template<> struct _integer_traits @@ -299,6 +306,7 @@ template<> struct _integer_traits static constexpr bool kSigned = true; static constexpr bool kUnsigned = false; using as_unsigned = uint64_t; + using as_signed = int64_t; }; template concept is_signed_integer = _integer_traits::kSigned; @@ -306,8 +314,8 @@ template concept is_unsigned_integer = _integer_traits::kUnsigned template concept is_integer = is_signed_integer || is_unsigned_integer; -template using as_unsigned_integer = _integer_traits::as_unsigned; -template using as_signed_integer = _integer_traits::as_signed; +template using as_unsigned_integer = _integer_traits::as_unsigned; +template using as_signed_integer = _integer_traits::as_signed; template concept is_enum = __is_enum(T); -- cgit