flat_map is documented as supporting unique keys, but flat_map::erase(key_type) is documented as erasing all the elements with that key (as if there could be several) and indeed the code wastes time looking for a range of equal keys after it has found one equal key.
flat_map is documented as supporting unique keys, but flat_map::erase(key_type) is documented as erasing all the elements with that key (as if there could be several) and indeed the code wastes time looking for a range of equal keys after it has found one equal key.