vendredi 26 août 2016

Find last element in std::vector which satisfies a condition

I have this requirement to find the last element in the vector which is smaller than a value.

Like find_first_of but instead of first i want last. I searched and found that there is no find_last_of but there is find_first_of.

Why is that so? Is the standard way is to use find_first_of with reverse iterators?

Aucun commentaire:

Enregistrer un commentaire