CBMC
|
Zip two ranges to make a range of pairs. More...
#include <range.h>
Public Types | |
using | difference_type = typename first_iteratort::difference_type |
using | value_type = std::pair< typename first_iteratort::value_type, typename second_iteratort::value_type > |
using | pointer = value_type * |
using | reference = value_type & |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
bool | operator== (const zip_iteratort &other) const |
bool | operator!= (const zip_iteratort &other) const |
zip_iteratort & | operator++ () |
Preincrement operator. More... | |
zip_iteratort | operator++ (int) |
Postincrement operator. More... | |
reference | operator* () const |
pointer | operator-> () const |
zip_iteratort (first_iteratort _first_begin, first_iteratort _first_end, second_iteratort _second_begin, second_iteratort _second_end) | |
Private Member Functions | |
bool | end_reached () const |
Private Attributes | |
first_iteratort | first_begin |
first_iteratort | first_end |
second_iteratort | second_begin |
second_iteratort | second_end |
std::shared_ptr< value_type > | current = nullptr |
Zip two ranges to make a range of pairs.
On increment, both iterators are incremented. Ends when both of the two ranges reach their end if same_size
is true, when one of the two ranges ends otherwise.
same_size | if true invariants are checking that one range does not end before the other |
using zip_iteratort< first_iteratort, second_iteratort, same_size >::difference_type = typename first_iteratort::difference_type |
using zip_iteratort< first_iteratort, second_iteratort, same_size >::iterator_category = std::forward_iterator_tag |
using zip_iteratort< first_iteratort, second_iteratort, same_size >::pointer = value_type * |
using zip_iteratort< first_iteratort, second_iteratort, same_size >::reference = value_type & |
using zip_iteratort< first_iteratort, second_iteratort, same_size >::value_type = std::pair< typename first_iteratort::value_type, typename second_iteratort::value_type> |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |