[libcxx-commits] [PATCH] D129056: [libc++] Prefer __has_builtin for detecting compiler-provided type_traits

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 5 14:11:20 PDT 2022


philnik added a comment.

In D129056#3631232 <https://reviews.llvm.org/D129056#3631232>, @ldionne wrote:

> LGTM, but I don't understand what's the special-casing for GCC that you mention in the commit message. Can you elaborate?

We've had a few `__has_keyword(whatever) || _LIBCPP_COMPILER_GCC` before (for example in `is_trivially_destructible.h`). The `|| _LIBCPP_COMPILER_GCC` is now unnecessary, since GCC correctly reports support for builtin type traits with `__has_builtin`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129056



More information about the libcxx-commits mailing list