From e8715ffb96dba87f1711e32b68e16ea84187023a Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Mon, 26 Sep 2022 15:16:52 -0700 Subject: [PATCH] Update internal foa table implementation to use to_address when Allocators use fancy pointers --- include/boost/unordered/detail/foa.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 96456bcb..a62fd049 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -672,13 +672,13 @@ private: } else{ group_allocator gal=al; - new_arrays_.groups=group_alloc_traits::allocate(gal,groups_size); + new_arrays_.groups=boost::to_address(group_alloc_traits::allocate(gal,groups_size)); // TODO: explain why memset std::memset( new_arrays_.groups,0,sizeof(group_type)*groups_size-1); new_arrays_.groups[groups_size-1].set_sentinel(); BOOST_TRY{ - new_arrays_.elements=alloc_traits::allocate(al,groups_size*N-1); + new_arrays_.elements=boost::to_address(alloc_traits::allocate(al,groups_size*N-1)); } BOOST_CATCH(...){ group_alloc_traits::deallocate(gal,new_arrays_.groups,groups_size);