From 54d90ffbf325a421d625621a597d9ca4e357bc58 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 18 Jun 2016 07:06:06 +0100 Subject: [PATCH] Changed definitions for 'char' for is_signed and is_unsigned to handle instances where char can be unsigned. --- src/type_traits.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/type_traits.h b/src/type_traits.h index b67c55e8..bef809ae 100644 --- a/src/type_traits.h +++ b/src/type_traits.h @@ -152,7 +152,7 @@ namespace etl /// is_signed ///\ingroup type_traits template struct is_signed : false_type {}; - template <> struct is_signed : true_type {}; + template <> struct is_signed : integral_constant {}; template <> struct is_signed : public etl::integral_constant(wchar_t(-1) < wchar_t(0))> {}; template <> struct is_signed : true_type {}; template <> struct is_signed : true_type {}; @@ -170,6 +170,7 @@ namespace etl ///\ingroup type_traits template struct is_unsigned : false_type {}; template <> struct is_unsigned : true_type {}; + template <> struct is_unsigned : integral_constant 0)> {}; template <> struct is_unsigned : true_type {}; template <> struct is_unsigned : public etl::integral_constant wchar_t(0))> {}; template <> struct is_unsigned : true_type {};