Namespaces
Variants
Views
Actions

Talk:cpp/types/is unsigned

From cppreference.com

May want to note that even with the new C++11 capability to define the underlying type, using an unsigned type, e.g. unsigned char, does not (and should not) return true:

enum enum_type: unsigned char
{
   ENUM_VALUE0,
   ENUM_VALUE1
};
is_unsigned<enum_type>::value!=true

Because enum (and enum class) types are not arithmetic.

Noted this in the example, thanks. -- P12 01:54, 5 September 2012 (PDT)