diff --git a/libcxx/include/__type_traits/extent.h b/libcxx/include/__type_traits/extent.h --- a/libcxx/include/__type_traits/extent.h +++ b/libcxx/include/__type_traits/extent.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__array_extent) +#if __has_builtin(__array_extent) template struct _LIBCPP_TEMPLATE_VIS extent @@ -30,7 +30,7 @@ inline constexpr size_t extent_v = __array_extent(_Tp, _Ip); #endif -#else // __has_keyword(__array_extent) +#else // __has_builtin(__array_extent) template struct _LIBCPP_TEMPLATE_VIS extent : public integral_constant {}; @@ -48,7 +48,7 @@ inline constexpr size_t extent_v = extent<_Tp, _Ip>::value; #endif -#endif // __has_keyword(__array_extent) +#endif // __has_builtin(__array_extent) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/has_virtual_destructor.h b/libcxx/include/__type_traits/has_virtual_destructor.h --- a/libcxx/include/__type_traits/has_virtual_destructor.h +++ b/libcxx/include/__type_traits/has_virtual_destructor.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_feature(has_virtual_destructor) || defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__has_virtual_destructor) template struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor : public integral_constant {}; diff --git a/libcxx/include/__type_traits/is_array.h b/libcxx/include/__type_traits/is_array.h --- a/libcxx/include/__type_traits/is_array.h +++ b/libcxx/include/__type_traits/is_array.h @@ -21,7 +21,7 @@ // TODO: Clang incorrectly reports that __is_array is true for T[0]. // Re-enable the branch once https://llvm.org/PR54705 is fixed. -#if __has_keyword(__is_array) && 0 +#if __has_builtin(__is_array) && 0 template struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> { }; @@ -45,7 +45,7 @@ inline constexpr bool is_array_v = is_array<_Tp>::value; #endif -#endif // __has_keyword(__is_array) +#endif // __has_builtin(__is_array) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_assignable.h b/libcxx/include/__type_traits/is_assignable.h --- a/libcxx/include/__type_traits/is_assignable.h +++ b/libcxx/include/__type_traits/is_assignable.h @@ -20,7 +20,7 @@ template struct __select_2nd { typedef _LIBCPP_NODEBUG _Tp type; }; -#if __has_keyword(__is_assignable) +#if __has_builtin(__is_assignable) template struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { }; @@ -30,7 +30,7 @@ inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Arg); #endif -#else // __has_keyword(__is_assignable) +#else // __has_builtin(__is_assignable) template typename __select_2nd() = declval<_Arg>())), true_type>::type @@ -59,7 +59,7 @@ inline constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value; #endif -#endif // __has_keyword(__is_assignable) +#endif // __has_builtin(__is_assignable) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_compound.h b/libcxx/include/__type_traits/is_compound.h --- a/libcxx/include/__type_traits/is_compound.h +++ b/libcxx/include/__type_traits/is_compound.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_compound) +#if __has_builtin(__is_compound) template struct _LIBCPP_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> { }; @@ -29,7 +29,7 @@ inline constexpr bool is_compound_v = __is_compound(_Tp); #endif -#else // __has_keyword(__is_compound) +#else // __has_builtin(__is_compound) template struct _LIBCPP_TEMPLATE_VIS is_compound : public integral_constant::value> {}; @@ -39,7 +39,7 @@ inline constexpr bool is_compound_v = is_compound<_Tp>::value; #endif -#endif // __has_keyword(__is_compound) +#endif // __has_builtin(__is_compound) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_const.h b/libcxx/include/__type_traits/is_const.h --- a/libcxx/include/__type_traits/is_const.h +++ b/libcxx/include/__type_traits/is_const.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_const) +#if __has_builtin(__is_const) template struct _LIBCPP_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> { }; @@ -38,7 +38,7 @@ inline constexpr bool is_const_v = is_const<_Tp>::value; #endif -#endif // __has_keyword(__is_const) +#endif // __has_builtin(__is_const) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h --- a/libcxx/include/__type_traits/is_convertible.h +++ b/libcxx/include/__type_traits/is_convertible.h @@ -24,12 +24,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_feature(is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) +#if __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) template struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; -#else // __has_feature(is_convertible_to) +#else // __has_builtin(__is_convertible_to) namespace __is_convertible_imp { @@ -96,7 +96,7 @@ static const size_t __complete_check2 = __is_convertible_check<_T2>::__v; }; -#endif // __has_feature(is_convertible_to) +#endif // __has_builtin(__is_convertible_to) #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_destructible.h b/libcxx/include/__type_traits/is_destructible.h --- a/libcxx/include/__type_traits/is_destructible.h +++ b/libcxx/include/__type_traits/is_destructible.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_destructible) +#if __has_builtin(__is_destructible) template struct _LIBCPP_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_Tp)> { }; @@ -32,7 +32,7 @@ inline constexpr bool is_destructible_v = __is_destructible(_Tp); #endif -#else // __has_keyword(__is_destructible) +#else // __has_builtin(__is_destructible) // if it's a reference, return true // if it's a function, return false @@ -95,7 +95,7 @@ inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; #endif -#endif // __has_keyword(__is_destructible) +#endif // __has_builtin(__is_destructible) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_function.h b/libcxx/include/__type_traits/is_function.h --- a/libcxx/include/__type_traits/is_function.h +++ b/libcxx/include/__type_traits/is_function.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_function) +#if __has_builtin(__is_function) template struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant {}; @@ -31,7 +31,7 @@ struct _LIBCPP_TEMPLATE_VIS is_function : public integral_constant::value || is_const::value)> {}; -#endif // __has_keyword(__is_function) +#endif // __has_builtin(__is_function) #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_fundamental.h b/libcxx/include/__type_traits/is_fundamental.h --- a/libcxx/include/__type_traits/is_fundamental.h +++ b/libcxx/include/__type_traits/is_fundamental.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_fundamental) +#if __has_builtin(__is_fundamental) template struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> { }; @@ -30,7 +30,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); #endif -#else // __has_keyword(__is_fundamental) +#else // __has_builtin(__is_fundamental) template struct _LIBCPP_TEMPLATE_VIS is_fundamental : public integral_constant::value || @@ -42,7 +42,7 @@ inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; #endif -#endif // __has_keyword(__is_fundamental) +#endif // __has_builtin(__is_fundamental) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h --- a/libcxx/include/__type_traits/is_integral.h +++ b/libcxx/include/__type_traits/is_integral.h @@ -45,7 +45,7 @@ template <> struct __libcpp_is_integral<__uint128_t> { enum { value = 1 }; }; #endif -#if __has_keyword(__is_integral) +#if __has_builtin(__is_integral) template struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> { }; @@ -65,7 +65,7 @@ inline constexpr bool is_integral_v = is_integral<_Tp>::value; #endif -#endif // __has_keyword(__is_integral) +#endif // __has_builtin(__is_integral) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_member_function_pointer.h b/libcxx/include/__type_traits/is_member_function_pointer.h --- a/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/libcxx/include/__type_traits/is_member_function_pointer.h @@ -36,7 +36,7 @@ }; }; -#if __has_keyword(__is_member_function_pointer) +#if __has_builtin(__is_member_function_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer @@ -47,7 +47,7 @@ inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp); #endif -#else // __has_keyword(__is_member_function_pointer) +#else // __has_builtin(__is_member_function_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_func > {}; @@ -57,7 +57,7 @@ inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; #endif -#endif // __has_keyword(__is_member_function_pointer) +#endif // __has_builtin(__is_member_function_pointer) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_member_object_pointer.h b/libcxx/include/__type_traits/is_member_object_pointer.h --- a/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/libcxx/include/__type_traits/is_member_object_pointer.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_member_object_pointer) +#if __has_builtin(__is_member_object_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer @@ -29,7 +29,7 @@ inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp); #endif -#else // __has_keyword(__is_member_object_pointer) +#else // __has_builtin(__is_member_object_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_obj > {}; @@ -39,7 +39,7 @@ inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; #endif -#endif // __has_keyword(__is_member_object_pointer) +#endif // __has_builtin(__is_member_object_pointer) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_member_pointer.h b/libcxx/include/__type_traits/is_member_pointer.h --- a/libcxx/include/__type_traits/is_member_pointer.h +++ b/libcxx/include/__type_traits/is_member_pointer.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_member_pointer) +#if __has_builtin(__is_member_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> { }; @@ -28,7 +28,7 @@ inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp); #endif -#else // __has_keyword(__is_member_pointer) +#else // __has_builtin(__is_member_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_member > {}; @@ -38,7 +38,7 @@ inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; #endif -#endif // __has_keyword(__is_member_pointer) +#endif // __has_builtin(__is_member_pointer) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcxx/include/__type_traits/is_nothrow_assignable.h --- a/libcxx/include/__type_traits/is_nothrow_assignable.h +++ b/libcxx/include/__type_traits/is_nothrow_assignable.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_nothrow_assignable) +#if __has_builtin(__is_nothrow_assignable) template struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable @@ -47,7 +47,7 @@ { }; -#endif // _LIBCPP_HAS_NO_NOEXCEPT +#endif // __has_builtin(__is_nothrow_assignable) #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcxx/include/__type_traits/is_nothrow_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_nothrow_constructible) +#if __has_builtin(__is_nothrow_constructible) template struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible @@ -62,7 +62,7 @@ { }; -#endif // _LIBCPP_HAS_NO_NOEXCEPT +#endif // __has_builtin(__is_nothrow_constructible) #if _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__type_traits/is_object.h b/libcxx/include/__type_traits/is_object.h --- a/libcxx/include/__type_traits/is_object.h +++ b/libcxx/include/__type_traits/is_object.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_object) +#if __has_builtin(__is_object) template struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> { }; @@ -32,7 +32,7 @@ inline constexpr bool is_object_v = __is_object(_Tp); #endif -#else // __has_keyword(__is_object) +#else // __has_builtin(__is_object) template struct _LIBCPP_TEMPLATE_VIS is_object : public integral_constant::value || @@ -45,7 +45,7 @@ inline constexpr bool is_object_v = is_object<_Tp>::value; #endif -#endif // __has_keyword(__is_object) +#endif // __has_builtin(__is_object) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_pod.h b/libcxx/include/__type_traits/is_pod.h --- a/libcxx/include/__type_traits/is_pod.h +++ b/libcxx/include/__type_traits/is_pod.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_feature(is_pod) || defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__is_pod) template struct _LIBCPP_TEMPLATE_VIS is_pod : public integral_constant {}; @@ -31,7 +31,7 @@ is_trivially_copy_assignable<_Tp>::value && is_trivially_destructible<_Tp>::value> {}; -#endif +#endif // __has_builtin(__is_pod) #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h --- a/libcxx/include/__type_traits/is_pointer.h +++ b/libcxx/include/__type_traits/is_pointer.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_pointer) +#if __has_builtin(__is_pointer) template struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> { }; @@ -29,7 +29,7 @@ inline constexpr bool is_pointer_v = __is_pointer(_Tp); #endif -#else // __has_keyword(__is_pointer) +#else // __has_builtin(__is_pointer) template struct __libcpp_is_pointer : public false_type {}; template struct __libcpp_is_pointer<_Tp*> : public true_type {}; @@ -50,7 +50,7 @@ inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; #endif -#endif // __has_keyword(__is_pointer) +#endif // __has_builtin(__is_pointer) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_reference.h b/libcxx/include/__type_traits/is_reference.h --- a/libcxx/include/__type_traits/is_reference.h +++ b/libcxx/include/__type_traits/is_reference.h @@ -18,9 +18,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_lvalue_reference) && \ - __has_keyword(__is_rvalue_reference) && \ - __has_keyword(__is_reference) +#if __has_builtin(__is_lvalue_reference) && \ + __has_builtin(__is_rvalue_reference) && \ + __has_builtin(__is_reference) template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; @@ -40,7 +40,7 @@ inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp); #endif -#else // __has_keyword(__is_lvalue_reference) && etc... +#else // __has_builtin(__is_lvalue_reference) && etc... template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {}; @@ -63,7 +63,7 @@ inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; #endif -#endif // __has_keyword(__is_lvalue_reference) && etc... +#endif // __has_builtin(__is_lvalue_reference) && etc... _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_scalar.h b/libcxx/include/__type_traits/is_scalar.h --- a/libcxx/include/__type_traits/is_scalar.h +++ b/libcxx/include/__type_traits/is_scalar.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_scalar) +#if __has_builtin(__is_scalar) template struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> { }; @@ -32,7 +32,7 @@ inline constexpr bool is_scalar_v = __is_scalar(_Tp); #endif -#else // __has_keyword(__is_scalar) +#else // __has_builtin(__is_scalar) template struct __is_block : false_type {}; #if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) @@ -54,7 +54,7 @@ inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; #endif -#endif // __has_keyword(__is_scalar) +#endif // __has_builtin(__is_scalar) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_signed.h b/libcxx/include/__type_traits/is_signed.h --- a/libcxx/include/__type_traits/is_signed.h +++ b/libcxx/include/__type_traits/is_signed.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_signed) +#if __has_builtin(__is_signed) template struct _LIBCPP_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> { }; @@ -28,7 +28,7 @@ inline constexpr bool is_signed_v = __is_signed(_Tp); #endif -#else // __has_keyword(__is_signed) +#else // __has_builtin(__is_signed) template ::value> struct __libcpp_is_signed_impl : public _BoolConstant<(_Tp(-1) < _Tp(0))> {}; @@ -48,7 +48,7 @@ inline constexpr bool is_signed_v = is_signed<_Tp>::value; #endif -#endif // __has_keyword(__is_signed) +#endif // __has_builtin(__is_signed) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_standard_layout.h b/libcxx/include/__type_traits/is_standard_layout.h --- a/libcxx/include/__type_traits/is_standard_layout.h +++ b/libcxx/include/__type_traits/is_standard_layout.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS is_standard_layout -#if __has_feature(is_standard_layout) || defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__is_standard_layout) : public integral_constant #else : integral_constant::type>::value> diff --git a/libcxx/include/__type_traits/is_trivial.h b/libcxx/include/__type_traits/is_trivial.h --- a/libcxx/include/__type_traits/is_trivial.h +++ b/libcxx/include/__type_traits/is_trivial.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS is_trivial -#if __has_feature(is_trivial) || defined(_LIBCPP_COMPILER_GCC) +#if __has_builtin(__is_trivial) : public integral_constant #else : integral_constant::value && diff --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h --- a/libcxx/include/__type_traits/is_trivially_destructible.h +++ b/libcxx/include/__type_traits/is_trivially_destructible.h @@ -18,12 +18,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_trivially_destructible) +#if __has_builtin(__is_trivially_destructible) template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible : public integral_constant {}; -#elif __has_feature(has_trivial_destructor) || defined(_LIBCPP_COMPILER_GCC) +#elif __has_builtin(__has_trivial_destructor) template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible : public integral_constant::value && __has_trivial_destructor(_Tp)> {}; @@ -40,7 +40,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]> : public false_type {}; -#endif +#endif // __has_builtin(__is_trivially_destructible) #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_unsigned.h b/libcxx/include/__type_traits/is_unsigned.h --- a/libcxx/include/__type_traits/is_unsigned.h +++ b/libcxx/include/__type_traits/is_unsigned.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // Before AppleClang 14, __is_unsigned returned true for enums with signed underlying type. -#if __has_keyword(__is_unsigned) && !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1400) +#if __has_builtin(__is_unsigned) && !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1400) template struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { }; @@ -31,7 +31,7 @@ inline constexpr bool is_unsigned_v = __is_unsigned(_Tp); #endif -#else // __has_keyword(__is_unsigned) +#else // __has_builtin(__is_unsigned) template ::value> struct __libcpp_is_unsigned_impl : public _BoolConstant<(_Tp(0) < _Tp(-1))> {}; @@ -51,7 +51,7 @@ inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; #endif -#endif // __has_keyword(__is_unsigned) +#endif // __has_builtin(__is_unsigned) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_void.h b/libcxx/include/__type_traits/is_void.h --- a/libcxx/include/__type_traits/is_void.h +++ b/libcxx/include/__type_traits/is_void.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_void) +#if __has_builtin(__is_void) template struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> { }; @@ -38,7 +38,7 @@ inline constexpr bool is_void_v = is_void<_Tp>::value; #endif -#endif // __has_keyword(__is_void) +#endif // __has_builtin(__is_void) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_volatile.h b/libcxx/include/__type_traits/is_volatile.h --- a/libcxx/include/__type_traits/is_volatile.h +++ b/libcxx/include/__type_traits/is_volatile.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_keyword(__is_volatile) +#if __has_builtin(__is_volatile) template struct _LIBCPP_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> { }; @@ -38,7 +38,7 @@ inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; #endif -#endif // __has_keyword(__is_volatile) +#endif // __has_builtin(__is_volatile) _LIBCPP_END_NAMESPACE_STD