![]() |
Zen C++ Libraries
Zero-dependency re-usable components for C++
|
Support for creating ranges over iterators. More...
#include <iterator>#include <tuple>#include <type_traits>#include <utility>#include "zen/config.hpp"#include "zen/concepts.hpp"#include "zen/compat.hpp"#include "zen/mapped_iterator.hpp"#include "zen/zip_iterator.hpp"Go to the source code of this file.
Classes | |
| class | iterator_range< IterT > |
| struct | _zip_accept_rvalue< T > |
| struct | _zip_accept_rvalue< iterator_range< IterT > > |
Functions | |
| template<typename IterT> | |
| auto | make_iterator_range (IterT &&a, IterT &&b) |
| template<typename IterT> | |
| auto | make_iterator_range (std::pair< IterT, IterT > &&pair) |
| template<range T> | |
| auto | make_iterator_range (T &container) |
| template<range ... Ts> | |
| auto | zip (Ts &&...args) |
Support for creating ranges over iterators.
| auto make_iterator_range | ( | IterT && | a, |
| IterT && | b ) |
Create an iterator_range directly out of a start iterator and an end iterator.
The resulting object has methods begin() and end(), which makes it compatible with for-loops.
| auto make_iterator_range | ( | std::pair< IterT, IterT > && | pair | ) |
Construct an iterator range from a pair of iterators.
This function is especially useful for methods in the standard library that return such a pair of iterators, such as std::unordered_map::equal_range.
| auto zip | ( | Ts &&... | args | ) |
Create an iterator_range that zips over the given arguments.
To create a zipper that only holds constant references, use std::as_const