Hacker News new | ask | show | jobs
by thestoicattack 1915 days ago
std::move_iterator was my first thought too, but I'm not sure if it works, since the key type for std::unordered_map is defined to be const, so you may have to make a copy anyway.

Maybe use a vector-of-pointer-to-pair, since we're leaving the map around and we don't really need the vector to own anything.

1 comments

good point about the string being const! There are ways around that, but none pretty.