From 95df6832db839e4b322b22665ab1c74d4cc7d4b5 Mon Sep 17 00:00:00 2001 From: Tessil Date: Sat, 14 Sep 2024 13:14:53 +0100 Subject: [PATCH] Disable test_noexcept tests with MSVC std::list is not std::is_nothrow_move_constructible with MSVC making (b)hopscotch_map/set not std::is_nothrow_move_constructible in that case --- tests/hopscotch_map_tests.cpp | 2 ++ tests/hopscotch_set_tests.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/hopscotch_map_tests.cpp b/tests/hopscotch_map_tests.cpp index 48c344b..395b240 100644 --- a/tests/hopscotch_map_tests.cpp +++ b/tests/hopscotch_map_tests.cpp @@ -1510,11 +1510,13 @@ BOOST_AUTO_TEST_CASE(test_precalculated_hash) { BOOST_CHECK_EQUAL(map.erase(4, map.hash_function()(2)), 0); } +#ifndef _MSC_VER BOOST_AUTO_TEST_CASE_TEMPLATE(test_noexcept, HSet, test_types) { static_assert(std::is_nothrow_default_constructible::value, ""); static_assert(std::is_nothrow_move_constructible::value, ""); static_assert(std::is_nothrow_move_assignable::value, ""); static_assert(std::is_nothrow_swappable::value, ""); } +#endif BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/hopscotch_set_tests.cpp b/tests/hopscotch_set_tests.cpp index 61fdb5d..5cb31fc 100644 --- a/tests/hopscotch_set_tests.cpp +++ b/tests/hopscotch_set_tests.cpp @@ -163,11 +163,13 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_insert_transparent_hint, HSet, BOOST_CHECK_EQUAL(*otherIt, 2); } +#ifndef _MSC_VER BOOST_AUTO_TEST_CASE_TEMPLATE(test_noexcept, HSet, test_types) { static_assert(std::is_nothrow_default_constructible::value, ""); static_assert(std::is_nothrow_move_constructible::value, ""); static_assert(std::is_nothrow_move_assignable::value, ""); static_assert(std::is_nothrow_swappable::value, ""); } +#endif BOOST_AUTO_TEST_SUITE_END()