diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 2e4ca497..20f3f7d1 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -784,9 +784,9 @@ struct subaligned_table_arrays: byte_allocator bal=al; auto p=boost::to_address( byte_alloc_traits::allocate(bal,sizeof(group_type)*(groups_size+1)-1)); - groups_offset= + groups_offset=static_cast( (uintptr_t(sizeof(group_type))-reinterpret_cast(p))% - sizeof(group_type); + sizeof(group_type)); groups=reinterpret_cast(p+groups_offset); }