jeudi 21 juillet 2022

How should I assume which iterator category an algorithm uses?

Let's say :

std::sort(beg1, beg2, pred);

This algorithm takes a range of iterators for the container and a predicate. It takes an LegacyRandomAccessIterator. I do understand the the 5 iterator categories are categorised by their operators. Albeit I'm having a hard time assuming which iterator the algorithm uses.

Aucun commentaire:

Enregistrer un commentaire