diff --git a/include/type_traits b/include/type_traits index 14fa4c4db..924a60261 100644 --- a/include/type_traits +++ b/include/type_traits @@ -741,6 +741,14 @@ struct _LIBCPP_VISIBLE is_base_of // is_empty +#if __has_feature(is_empty) + +template +struct _LIBCPP_VISIBLE is_empty + : public integral_constant {}; + +#else // __has_feature(is_empty) + template struct __is_empty1 : public _Tp @@ -760,6 +768,8 @@ template struct __libcpp_empty<_Tp, false> : public false_type {}; template struct _LIBCPP_VISIBLE is_empty : public __libcpp_empty<_Tp> {}; +#endif // __has_feature(is_empty) + // is_polymorphic template struct __is_polymorphic1 : public _Tp {};