You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In open-adressing hash tables, begin() needs to advance to the first
valid element. We don't need to do the same for any other operations
like end(), find(), and try_emplace().
The problem is that the constructor of StringMapIterBase says:
bool NoAdvance = false
This increases the burden on the callers because most places need to
pass true for NoAdvance, defeating the benefit of the default
parameter.
This patch fixes the problem by changing the name and default to:
bool Advance = false
and adjusting callers. Again, begin() is the only caller that
specifies this parameter.
This patch fixes a "latent bug" where try_emplace() was requesting
advancing even on a successful insertion. I say "latent" because the
request is a no-op on success.
0 commit comments