From 286ef46560e36d67b86ecbef5e24cb6a56e311f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 11 Aug 2020 22:41:54 +0200 Subject: [PATCH] Fixes #127 ("static assertion failure with boost interprocess 1.74 and basic_managed_shared_memory"). Removes unneeded and (some of them, wrong) assert and static asserts in segment_manager's constructor. --- include/boost/interprocess/segment_manager.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/boost/interprocess/segment_manager.hpp b/include/boost/interprocess/segment_manager.hpp index c14ca89..0eb6265 100644 --- a/include/boost/interprocess/segment_manager.hpp +++ b/include/boost/interprocess/segment_manager.hpp @@ -425,12 +425,7 @@ class segment_manager (void)this_addr; (void)segm_addr; BOOST_ASSERT( this_addr == segm_addr); const std::size_t void_ptr_alignment = boost::move_detail::alignment_of::value; (void)void_ptr_alignment; - BOOST_ASSERT((0 == (std::size_t)this_addr % void_ptr_alignment)); - BOOST_ASSERT((0 == (std::size_t)segm_addr % void_ptr_alignment)); - BOOST_ASSERT((0 == (std::size_t)&m_header % void_ptr_alignment)); - BOOST_STATIC_ASSERT((boost::move_detail::alignment_of::value >= void_ptr_alignment)); - BOOST_STATIC_ASSERT((boost::move_detail::alignment_of::value >= void_ptr_alignment)); - BOOST_STATIC_ASSERT((boost::move_detail::alignment_of::value >= void_ptr_alignment)); + BOOST_ASSERT((0 == (std::size_t)this_addr % boost::move_detail::alignment_of::value)); } //!Tries to find a previous named/unique allocation. Returns the address