From 3d3457165432d7fdf2c564201bd1ed8ac44b5a9f Mon Sep 17 00:00:00 2001 From: joaquintides Date: Fri, 17 Mar 2023 19:56:30 +0100 Subject: [PATCH] tried yest another variation for for_all_elements_while --- include/boost/unordered/detail/foa/core.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa/core.hpp b/include/boost/unordered/detail/foa/core.hpp index ba596288..f7fdc899 100644 --- a/include/boost/unordered/detail/foa/core.hpp +++ b/include/boost/unordered/detail/foa/core.hpp @@ -1634,12 +1634,12 @@ public: static auto for_all_elements_while(const arrays_type& arrays_,F f) ->decltype(f(nullptr,0,nullptr),void()) { -#if 0 +#if 1 auto p=arrays_.elements; if(!p){return;} for(auto pg=arrays_.groups,last=pg+arrays_.groups_size_mask+1; pg!=last;++pg,p+=N){ - auto mask=pg->match_really_occupied(); + auto mask=pg->match_occupied()&~(int(pg==last-1)<<(N-1)); while(mask){ auto n=unchecked_countr_zero(mask); if(!f(pg,n,p+n))return;