Ctor
Foreach support
Foreach support with counter
Reset the counters, effectively forcing any interrupted iteration to start from the beginning.
if reset_after_foreach is true: resets the counters after each foreach so the next iteration starts from the beginning
Total count of the elements currently iterated
Last element within the last bucket that was iterated
Index of the last bucket that was iterated in the last call to foreach
Whether to reset the counter after each foreach
'foreach' iteration over elements in the set. DO NOT change the element keys during iteration because this will corrupt the map (unless it is guaranteed that the element will go to the same bucket).