From ffc4666fe956e4742742d6c12fa63b9b0adecf84 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Thu, 29 May 2025 20:19:02 +0100 Subject: [PATCH] Added char8_t, char16_t and char32_t is _integral and is_signed traits --- include/etl/type_traits.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index 46d296c4..2b23ecb4 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -288,6 +288,15 @@ namespace etl template <> struct is_integral : true_type {}; template <> struct is_integral : true_type {}; template <> struct is_integral : true_type {}; +#if ETL_HAS_NATIVE_CHAR8_T + template <> struct is_integral : true_type {}; +#endif +#if ETL_HAS_NATIVE_CHAR16_T + template <> struct is_integral : true_type {}; +#endif +#if ETL_HAS_NATIVE_CHAR32_T + template <> struct is_integral : true_type {}; +#endif template struct is_integral : is_integral {}; template struct is_integral : is_integral {}; template struct is_integral : is_integral {}; @@ -310,6 +319,15 @@ namespace etl template <> struct is_signed : true_type {}; template <> struct is_signed : true_type {}; template <> struct is_signed : true_type {}; +#if ETL_HAS_NATIVE_CHAR8_T + template <> struct is_signed : true_type {}; +#endif +#if ETL_HAS_NATIVE_CHAR16_T + template <> struct is_signed : true_type {}; +#endif +#if ETL_HAS_NATIVE_CHAR32_T + template <> struct is_signed : true_type {}; +#endif template struct is_signed : is_signed {}; template struct is_signed : is_signed {}; template struct is_signed : is_signed {}; @@ -416,6 +434,9 @@ namespace etl /// is_pointer template struct is_pointer_helper : false_type {}; template struct is_pointer_helper : true_type {}; + template struct is_pointer_helper : is_pointer_helper {}; + template struct is_pointer_helper : is_pointer_helper {}; + template struct is_pointer_helper : is_pointer_helper {}; template struct is_pointer : is_pointer_helper::type> {}; #if ETL_USING_CPP17