Relative Content

Tag Archive for c++c++17stdmap

How to use std::map extract with iterators?

I’ve been trying to use extract() to efficiently pull out a key and replace it, as the documentation says is possible. However, I can’t get my code to compile with a “regular” iterator, and the documentation implies that a const_iterator must be used instead.