diff --git a/tests/pure_cpp/smart_holder_poc_test.cpp b/tests/pure_cpp/smart_holder_poc_test.cpp index 18c57fa19..5a56c2821 100644 --- a/tests/pure_cpp/smart_holder_poc_test.cpp +++ b/tests/pure_cpp/smart_holder_poc_test.cpp @@ -10,7 +10,7 @@ namespace helpers { struct movable_int { int valu; movable_int(int v) : valu{v} {} - movable_int(movable_int &&other) { + movable_int(movable_int &&other) noexcept { valu = other.valu; other.valu = 91; } @@ -325,7 +325,7 @@ TEST_CASE("error_cannot_disown_nullptr", "[E]") { TEST_CASE("indestructible_int-from_raw_ptr_unowned+as_raw_ptr_unowned", "[S]") { using zombie = helpers::indestructible_int; // Using placement new instead of plain new, to not trigger leak sanitizer errors. - static char memory_block[sizeof(zombie)]; + static std::aligned_storage::type memory_block[1]; auto *value = new (memory_block) zombie(19); auto hld = smart_holder::from_raw_ptr_unowned(value); REQUIRE(hld.as_raw_ptr_unowned()->valu == 19);