Boost C++ Libraries: Ticket #11296: Function to update key https://svn.boost.org/trac10/ticket/11296 <p> Sometimes the key of a node has to be updated. Could you add a function for this? </p> <p> void update_key(iterator, key_type); </p> <p> It allows an alloc / dealloc pair to be avoided and it allows for simpler (client) code. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11296 Trac 1.4.3 Daniel James Mon, 05 Dec 2016 22:57:40 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11296#comment:1 https://svn.boost.org/trac10/ticket/11296#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> 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: </p> <pre class="wiki">auto n = x.extract(it); n.key() = 100; x.insert(n); </pre> Ticket