Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Single lookup for try_emplace and insert_or_assign (#116)
Browse files Browse the repository at this point in the history
Found by @GilesBathgate who provided a POC in #114. Thanks!

Now try_emplace and isnert_or_assign don't require two lookups.

This implementation reuses the same insertion code for insert() and emplace().
Also fixes a bug for emplace() where a node was not destroyed when overflow
exception occured.
  • Loading branch information
martinus authored Mar 14, 2021
1 parent a961e47 commit a8f297b
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 114 deletions.
Loading

0 comments on commit a8f297b

Please sign in to comment.