dimanche 2 août 2015

Why c++ containers do not implement erase( reverse_iterator position )?

I looked at some C++ containers (vector, deque, list, map, set) and found that none of them implement

erase(reverse_iterator position)

There is a way to get iterator from reverse_iterator as described in this answer.

But why above containers do not implement the erase member function with reverse_iterator parameter?

Is there any significant difference between iterator and reverse_iterator which makes such implementation difficult or it was not implemented for another reason?

Aucun commentaire:

Enregistrer un commentaire