ordered-map icon indicating copy to clipboard operation
ordered-map copied to clipboard

API similar to merge API of std::unordered_map

Open ParikaGoel opened this issue 6 months ago • 0 comments

merge API in std::unordered_map -> https://en.cppreference.com/w/cpp/container/unordered_map/merge.html

It provides the facility to avoid copying of {key,value} pairs. Entry from source container is extracted and inserted to destination container. No elements are copied or moved, only the internal pointers of the container nodes are repointed.

In current implementation, insert API of tsl::ordered_map has a variant that copies the entries from source container to destination container. Since copying can be expensive, it will be useful to have the above mentioned functionality

ParikaGoel avatar Jul 04 '25 05:07 ParikaGoel