Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
iterator: Backports of Iterator Facilities From Newer C++ Versions

Arene base provides backports of various C++ iterator utilities, either because they are not natively available in C++14, or because later versions introduced improvements, such as being marked constexpr.

The public header is

The Bazel target is

//:iterator

Standard Library Backports

Backports from newer versions of the standard library, generally to provide constexpr support.

Iterator Operations

utility description stdlib equivalent
arene::base::advance Advances the given iterator by the specified number of steps std::advance
arene::base::distance Returns the number of steps between two iterators std::distance
arene::base::next Takes an initial iterator and a number of steps to move forward within a container, and returns the resulting iterator std::next
arene::base::prev Takes an initial iterator and a number of steps to move backward within a container, and returns the resulting iterator std::prev

Iterator Adaptors

utility description stdlib equivalent
arene::base::reverse_iterator Converts an iterator into a reverse iterator. std::reverse_iterator
arene::base::make_reverse_iterator Template-deduction factory for reverse_iterator std::make_reverse_iterator