protozero
Minimalistic protocol buffer decoder and encoder in C++.
|
#include <iterators.hpp>
Public Types | |
using | iterator = T |
The type of the iterators in this range. | |
using | value_type = typename std::iterator_traits< T >::value_type |
The value type of the underlying iterator. | |
Public Member Functions | |
constexpr | iterator_range () |
constexpr | iterator_range (iterator &&first_iterator, iterator &&last_iterator) |
constexpr iterator | begin () const noexcept |
Return iterator to beginning of range. | |
constexpr iterator | end () const noexcept |
Return iterator to end of range. | |
constexpr iterator | cbegin () const noexcept |
Return iterator to beginning of range. | |
constexpr iterator | cend () const noexcept |
Return iterator to end of range. | |
constexpr std::size_t | empty () const noexcept |
Return true if this range is empty. | |
value_type | front () const |
void | drop_front () |
void | swap (iterator_range &other) noexcept |
A range of iterators based on std::pair. Created from beginning and end iterators. Used as a return type from some pbf_reader methods that is easy to use with range-based for loops.
|
inline |
Default constructor. Create empty iterator_range.
|
inline |
Create iterator range from two iterators.
first_iterator | Iterator to beginning or range. |
last_iterator | Iterator to end or range. |
|
inline |
Advance beginning of range by one.
|
inline |
Get element at the beginning of the range.
|
inlinenoexcept |
Swap the contents of this range with the other.
other | Other range to swap data with. |