diff options
-rw-r--r-- | libcxx/include/type_traits | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 14fa4c4dbce..924a60261c5 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -741,6 +741,14 @@ struct _LIBCPP_VISIBLE is_base_of // is_empty +#if __has_feature(is_empty) + +template <class _Tp> +struct _LIBCPP_VISIBLE is_empty + : public integral_constant<bool, __is_empty(_Tp)> {}; + +#else // __has_feature(is_empty) + template <class _Tp> struct __is_empty1 : public _Tp @@ -760,6 +768,8 @@ template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {}; template <class _Tp> struct _LIBCPP_VISIBLE is_empty : public __libcpp_empty<_Tp> {}; +#endif // __has_feature(is_empty) + // is_polymorphic template <class _Tp> struct __is_polymorphic1 : public _Tp {}; |