[libcxx-commits] [PATCH] D97283: [libcxx][type_traits] is_unsigned is false for enum types

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 16 09:09:13 PDT 2021


zoecarver accepted this revision.
zoecarver added a comment.

@tmatheson This looks great. Thank you for enduring all the back and forth. Assuming the tests pass, let's land it!

In D97283#2629143 <https://reviews.llvm.org/D97283#2629143>, @Quuxplusone wrote:

> Unfortunately I think the current check for
>
>   #if __has_keyword(__is_unsigned) && _LIBCPP_CLANG_VER >= 1300
>
> has the effect of disabling the fast path for GCC and MSVC forever.
> However, we currently have the exact same problem in checks for `__is_pointer` and `__is_fundamental` (plus a redundant check for `nullptr` support in the latter), so I support landing this patch as-is-now and then I'll make a followup PR myself to change all these checks at once to e.g.
>
>   #if __has_keyword(__is_unsigned) && (!defined(_LIBCPP_CLANG_VER) || (_LIBCPP_CLANG_VER >= 1300))

I'd also be OK just waiting 6 months and removing these paths altogether.


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