[libcxx-commits] [PATCH] D98720: [libc++] Consistency in _LIBCPP_CLANG_VER tests in <type_traits>

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 18 09:08:49 PDT 2021


curdeius added a comment.

`_LIBCPP_CLANG_VER` isn't defined for Apple Clang, so branches that were previously disabled, are now enabled, hence the failures for is_pointer and is_unsigned.
An ugly quickfix would be to use `(!defined(_LIBCPP_COMPILER_CLANG) || _LIBCPP_CLANG_VER >= N)` instead of `(!defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER >= N)`.
Cf. https://github.com/llvm/llvm-project/blob/main/libcxx/include/__config#L184-L188.
Another solution would be to define `_LIBCPP_CLANG_VER` also for Apple Clang, but that might be tricky.
WDYT?

Apart from that, I like the clean-up.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98720/new/

https://reviews.llvm.org/D98720



More information about the libcxx-commits mailing list