From b198e58f67e1de85e70b8af6c0e83a12ec5dacb1 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Thu, 11 Oct 2018 04:07:20 +0000 Subject: [PATCH] Add a test that shows what happens with throwing destructors. NFC. llvm-svn: 344220 --- .../meta.unary.prop/is_nothrow_default_constructible.pass.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index c89ac89..9484b32 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -60,11 +60,22 @@ struct A A(); }; +#if TEST_STD_VER >= 11 +struct DThrows +{ + DThrows() noexcept(true) {} + ~DThrows() noexcept(false) {} +}; +#endif + int main() { test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); +#if TEST_STD_VER >= 11 + test_has_not_nothrow_default_constructor(); // This is LWG2116 +#endif test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); -- 2.7.4