mercredi 1 septembre 2021

Why isn't std::next/prev templated by distance like std::advance?

Out of curiosity, what's the rationale to use a template parameter for std::advance()'s distance type, but use the iterator's difference_type for the distance in std::next() and std::prev()?

Why not use the same approach (either one)?

Aucun commentaire:

Enregistrer un commentaire