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.
This commit is contained in:
Ion Gaztañaga
2020-08-11 22:41:54 +02:00
parent 9719fa19bc
commit 286ef46560

View File

@@ -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<void_pointer>::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<segment_manager>::value >= void_ptr_alignment));
BOOST_STATIC_ASSERT((boost::move_detail::alignment_of<segment_manager_base_t>::value >= void_ptr_alignment));
BOOST_STATIC_ASSERT((boost::move_detail::alignment_of<header_t>::value >= void_ptr_alignment));
BOOST_ASSERT((0 == (std::size_t)this_addr % boost::move_detail::alignment_of<segment_manager>::value));
}
//!Tries to find a previous named/unique allocation. Returns the address