[Bug libstdc++/54468] type trait is_unsigned<...>::value for C++11 enum class with underlying unsigned type not true
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 4 15:31:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54468
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-09-04 15:30:53 UTC ---
(In reply to comment #0)
> The is_unsigned<> type trait is not detecting the underlying signedness of a
> C++11 enum class or enum.
This is what the standard requires. The definition of is_unsigned is specified
as:
is_arithmetic<T>::value && T(-1) < T(0)
Since enum types are no arithmetic types, the traits must return false for
either of these.
More information about the Gcc-bugs
mailing list