From 25726c1a37136e3a723506e33acb8ea5b45108f5 Mon Sep 17 00:00:00 2001 From: achabense <60953653+achabense@users.noreply.github.com> Date: Sun, 17 Sep 2023 20:07:48 +0800 Subject: [PATCH] improve robustness --- tests/std/tests/VSO_0000000_allocator_propagation/test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp index 8401cdea771..0a65392b135 100644 --- a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp +++ b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp @@ -39,6 +39,9 @@ class lifetime_checker { static unordered_set record; public: + lifetime_checker(const lifetime_checker&) = delete; + lifetime_checker& operator=(const lifetime_checker&) = delete; + _CONSTEXPR20 lifetime_checker() noexcept /* terminates */ { if (!_Is_constant_evaluated()) { assert(record.insert(this).second); @@ -79,8 +82,6 @@ struct lifetime_checked_pointer : lifetime_checker { other.assert_living(); } - _CONSTEXPR20 ~lifetime_checked_pointer() {} - _CONSTEXPR20 lifetime_checked_pointer& operator=(const lifetime_checked_pointer& other) noexcept { assert_living(); other.assert_living();