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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 15 06:41:15 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp:107
+
+  test_is_not_unsigned<char>();
+  test_is_not_unsigned<signed char>();
----------------
Oh, you //added// these new tests, //that's// why AArch is failing!
Plain `char` (and apparently plain `wchar_t`? TIL) have implementation-defined signedness.
I think it would be good to at least verify that

    static_assert(is_signed_v<char> != is_unsigned_v<char>);
    static_assert(is_signed_v<wchar_t> != is_unsigned_v<wchar_t>);

but it would also be OK with me to just remove these two new lines from the tests. What do other people think?


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