Index: include/type_traits =================================================================== --- include/type_traits +++ include/type_traits @@ -3208,6 +3208,8 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible : public __libcpp_nothrow_destructor::type> {}; +template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[]> + : public integral_constant {}; #endif // is_pod Index: test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp @@ -68,6 +68,7 @@ struct PureProtectedDestructor { protected: virtual ~PureProtectedDestructor() = 0; }; struct PurePrivateDestructor { private: virtual ~PurePrivateDestructor() = 0; }; +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS struct DeletedPublicDestructor { public: ~DeletedPublicDestructor() = delete; }; struct DeletedProtectedDestructor { protected: ~DeletedProtectedDestructor() = delete; }; struct DeletedPrivateDestructor { private: ~DeletedPrivateDestructor() = delete; }; @@ -75,7 +76,7 @@ struct DeletedVirtualPublicDestructor { public: virtual ~DeletedVirtualPublicDestructor() = delete; }; struct DeletedVirtualProtectedDestructor { protected: virtual ~DeletedVirtualProtectedDestructor() = delete; }; struct DeletedVirtualPrivateDestructor { private: virtual ~DeletedVirtualPrivateDestructor() = delete; }; - +#endif int main() { @@ -100,12 +101,15 @@ test_is_not_destructible(); test_is_not_destructible(); +#if __has_feature(cxx_access_control_sfinae) test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); +#endif +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS test_is_not_destructible(); test_is_not_destructible(); test_is_not_destructible(); @@ -113,7 +117,7 @@ // test_is_not_destructible(); // currently fails due to clang bug #20268 test_is_not_destructible(); test_is_not_destructible(); - +#endif #if __has_feature(cxx_access_control_sfinae) test_is_not_destructible(); #endif Index: test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp @@ -49,11 +49,13 @@ class Abstract { +public: virtual void foo() = 0; }; class AbstractDestructor { +public: virtual ~AbstractDestructor() = 0; }; @@ -65,9 +67,9 @@ int main() { test_is_not_nothrow_destructible(); - test_is_not_nothrow_destructible(); test_is_not_nothrow_destructible(); test_is_not_nothrow_destructible(); + test_is_not_nothrow_destructible(); #if __has_feature(cxx_noexcept) test_is_nothrow_destructible(); @@ -84,7 +86,10 @@ test_is_nothrow_destructible(); test_is_nothrow_destructible(); test_is_nothrow_destructible(); +#if __has_feature(cxx_noexcept) test_is_nothrow_destructible(); + test_is_nothrow_destructible(); +#endif #if __has_feature(cxx_noexcept) test_is_nothrow_destructible(); #endif Index: test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp @@ -37,6 +37,7 @@ class NotEmpty { +public: virtual ~NotEmpty(); }; @@ -49,11 +50,13 @@ class Abstract { +public: virtual void foo() = 0; }; class AbstractDestructor { +public: virtual ~AbstractDestructor() = 0; };