Add a define that enables error checking in robin_hood map, to check for invalid uses of iteratos after map/set is modified. This is mostly for debugging.
Add a flag ROBIN_HOOD_ITERATOR_STABILITY_CHECK or something like that which enables/disables this code part:
Add counter member variable to robin_hood (initialized e.g. with a random number or just zero)
Counter is increased whenever the map is modified
All iterators get this counter when counter
accessing the iterator checks if the iterator's counter is the same as the map's counter, throws an exception otherwise
Add a define that enables error checking in robin_hood map, to check for invalid uses of iteratos after map/set is modified. This is mostly for debugging.
ROBIN_HOOD_ITERATOR_STABILITY_CHECK
or something like that which enables/disables this code part:Thanks John for suggesting this!