From f46ee4391f3b0b5ca26984a18c6ca0e7771c1dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 28 May 2024 10:51:33 +0200 Subject: [PATCH] Protect struct POD definition with the same macro as the test --- test/map_test.hpp | 2 +- test/vector_test.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/map_test.hpp b/test/map_test.hpp index 5cbfa6b..210952b 100644 --- a/test/map_test.hpp +++ b/test/map_test.hpp @@ -311,7 +311,7 @@ int map_test_range() ::boost::movelib::unique_ptr const pboostmap = ::boost::movelib::make_unique ( boost::make_move_iterator(&aux_vect[0]) - , boost::make_move_iterator(&aux_vect[0] + MaxElem), typename MyBoostMap::allocator_type()); + , boost::make_move_iterator(&aux_vect[0] + MaxElem)); ::boost::movelib::unique_ptr const pstdmap = ::boost::movelib::make_unique (&aux_vect2[0], &aux_vect2[0] + MaxElem, typename MyStdMap::key_compare()); if(!CheckEqualContainers(*pboostmap, *pstdmap)) return 1; diff --git a/test/vector_test.cpp b/test/vector_test.cpp index ed367af..4278b5d 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -226,11 +226,13 @@ bool test_span_conversion() #endif //BOOST_VECTOR_TEST_HAS_SPAN +#if !defined(_MSC_VER) struct POD { int POD::*ptr; }; BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::container::dtl::is_pod::value , "POD test failed" ); +#endif int main() { @@ -409,7 +411,7 @@ int main() } //////////////////////////////////// - // POD types should not be 0-filled testing + // POD types should not be 0-filled //////////////////////////////////// #if !defined(_MSC_VER) // MSVC miscompiles value initialization of pointers to data members,