diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2018-10-11 04:07:20 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2018-10-11 04:07:20 +0000 |
commit | b198e58f67e1de85e70b8af6c0e83a12ec5dacb1 (patch) | |
tree | 71c6d7b827cb6e366583ed00543b65258eab9b1e /libcxx/test/std/utilities | |
parent | fcfd434d4365a79e165122379cb95e709716b7e6 (diff) | |
download | bcm5719-llvm-b198e58f67e1de85e70b8af6c0e83a12ec5dacb1.tar.gz bcm5719-llvm-b198e58f67e1de85e70b8af6c0e83a12ec5dacb1.zip |
Add a test that shows what happens with throwing destructors. NFC.
llvm-svn: 344220
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 c89ac8944a9..9484b321c95 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<void>(); test_has_not_nothrow_default_constructor<int&>(); test_has_not_nothrow_default_constructor<A>(); +#if TEST_STD_VER >= 11 + test_has_not_nothrow_default_constructor<DThrows>(); // This is LWG2116 +#endif test_is_nothrow_default_constructible<Union>(); test_is_nothrow_default_constructible<Empty>(); |