Tutorial: reverse_iterator

| Home | Libraries | People | FAQ | More

## Tutorial: `reverse_iterator`

There is a `std::reverse_iterator` template that has been around since C++98. In C++20 it is compatible with proxy iterators, and is `constexpr`- and `noexcept`-friendly. If you are using C++20 or later, just use `std::reverse_iterator`. For code built against earlier versions of C++, you can use `reverse_iterator`.

There's nothing much to document about it; it works just like `std::reverse_iterator`.