Opened 7 years ago
Closed 6 years ago
#11296 closed Feature Requests (wontfix)
Function to update key
Reported by: | Owned by: | Daniel James | |
---|---|---|---|
Milestone: | To Be Determined | Component: | unordered |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Sometimes the key of a node has to be updated. Could you add a function for this?
void update_key(iterator, key_type);
It allows an alloc / dealloc pair to be avoided and it allows for simpler (client) code.
Note:
See TracTickets
for help on using tickets.
The C++17 way to do this is to extract the node, change the key, and insert it. I'll be implementing that in a future version. Something like: