C++C++11C++14C++17IteratorsLearn C++

Reverse Iterators in C++

By using bidirectional iterator or random access iterator (see Iterator Categories in C++) it’s possible to traverse the sequence in backward direction by using operator -- or by using the special adapter template class std::reverse_iterator. But why to bother with reverse iterators if the operator -- is available for iterators with bidirectional traversing capabilities? The answer is…
Read more