mercredi 27 septembre 2017

Why does std::(multi)set provide non const iterator methods

Why do the sets (std::set and std::multiset) in the C++ standard library provide non const iterator methods (http://ift.tt/2wVgDpT and http://ift.tt/2yIz7qV)?

Access to the keys through iterators is always const, does not matter if the set itself is const or not, then why introduce those extra overloads?

Aucun commentaire:

Enregistrer un commentaire