[libc++] Prefer __has_builtin for detecting compiler-provided type_traits
authorNikolas Klauser <nikolasklauser@berlin.de>
Mon, 4 Jul 2022 01:27:58 +0000 (03:27 +0200)
committerNikolas Klauser <nikolasklauser@berlin.de>
Wed, 6 Jul 2022 11:33:50 +0000 (13:33 +0200)
commit2040fde9097ae7753531c9c58332a933cbaaa43c
treecac5c969f13e553c46124f2a4b8cfb49250bdd88
parent30b6c51f515e633d6a798ddb82d4591d597670e9
[libc++] Prefer __has_builtin for detecting compiler-provided type_traits

Both clang and GCC support using `__has_builtin` for detecting compiler-provided type_traits. Use it instead of `__has_keyword` or `__has_feature` to remove special-casing for GCC-provided builtins

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D129056
28 files changed:
libcxx/include/__type_traits/extent.h
libcxx/include/__type_traits/has_virtual_destructor.h
libcxx/include/__type_traits/is_array.h
libcxx/include/__type_traits/is_assignable.h
libcxx/include/__type_traits/is_compound.h
libcxx/include/__type_traits/is_const.h
libcxx/include/__type_traits/is_convertible.h
libcxx/include/__type_traits/is_destructible.h
libcxx/include/__type_traits/is_function.h
libcxx/include/__type_traits/is_fundamental.h
libcxx/include/__type_traits/is_integral.h
libcxx/include/__type_traits/is_member_function_pointer.h
libcxx/include/__type_traits/is_member_object_pointer.h
libcxx/include/__type_traits/is_member_pointer.h
libcxx/include/__type_traits/is_nothrow_assignable.h
libcxx/include/__type_traits/is_nothrow_constructible.h
libcxx/include/__type_traits/is_object.h
libcxx/include/__type_traits/is_pod.h
libcxx/include/__type_traits/is_pointer.h
libcxx/include/__type_traits/is_reference.h
libcxx/include/__type_traits/is_scalar.h
libcxx/include/__type_traits/is_signed.h
libcxx/include/__type_traits/is_standard_layout.h
libcxx/include/__type_traits/is_trivial.h
libcxx/include/__type_traits/is_trivially_destructible.h
libcxx/include/__type_traits/is_unsigned.h
libcxx/include/__type_traits/is_void.h
libcxx/include/__type_traits/is_volatile.h