fixed UB with begin when using fast iteration

This commit is contained in:
joaquintides 2023-03-06 13:50:25 +01:00
parent bd08e49255
commit c50461528c

View File

@ -1457,7 +1457,7 @@ public:
iterator begin()noexcept
{
iterator it{arrays.groups,0,arrays.elements};
if(!(arrays.groups[0].match_occupied()&0x1))++it;
if(arrays.elements&&!(arrays.groups[0].match_occupied()&0x1))++it;
return it;
}