[libcxx-commits] [PATCH] D97283: [libcxx][type_traits] is_unsigned is false for enum types
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 4 15:51:48 PST 2021
ldionne requested changes to this revision.
ldionne added a subscriber: zoecarver.
ldionne added a comment.
This revision now requires changes to proceed.
Requesting changes because I'd like an answer to the question before we move forward with this.
================
Comment at: libcxx/include/type_traits:1459
template <class _Tp>
-_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v = __is_unsigned(_Tp);
+_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v = __is_unsigned(_Tp) &&
+ !__is_enum(_Tp);
----------------
Have we asked the compiler folks why `__is_unsigned` is implemented that way? This looks like a simple Clang bug to me.
@zoecarver did you implement this intrinsic or was it there already?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97283/new/
https://reviews.llvm.org/D97283
More information about the libcxx-commits
mailing list