On 17 Aug 2014 at 9:47, Ion Gaztañaga wrote:
I think we should implement the minimal functions in order to improve the proposal and add it to the standard when possible. Even in the original proposal, "node_ptr extract(const key_type& x);" seems redundant.
Why?
Isn't just a slightly modified "extract(find(k))"? The only difference that extract(it) is undefined when passing the end node. I don't know if having the extra check is important or the programmer should check find() != end() before using extract()
For a concurrent_unordered_map, extract(key) is rehash safe while extract(iterator) is not. Indeed, anything which uses an iterator is rehash unsafe, for obvious reasons. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/