cprover
range.h File Reference

Ranges: pair of begin and end iterators, which can be initialized from containers, provide useful methods such as map, filter and concat which only manipulate iterators, and can be used with ranged-for. More...

#include <functional>
#include <type_traits>
#include <util/invariant.h>
#include <util/make_unique.h>
+ Include dependency graph for range.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  map_iteratort< iteratort, outputt >
 Iterator which applies some given function f after each increment and returns its result on dereference. More...
 
class  filter_iteratort< iteratort >
 Iterator which only stops at elements for which some given function f is true. More...
 
struct  concat_iteratort< first_iteratort, second_iteratort >
 On increment, increments a first iterator and when the corresponding end iterator is reached, starts to increment a second one. More...
 
struct  ranget< iteratort >
 A range is a pair of a begin and an end iterators. More...
 

Functions

template<typename iteratort >
ranget< iteratort > make_range (iteratort begin, iteratort end)
 
template<typename containert >
auto make_range (containert &container) -> ranget< decltype(container.begin())>
 

Detailed Description

Ranges: pair of begin and end iterators, which can be initialized from containers, provide useful methods such as map, filter and concat which only manipulate iterators, and can be used with ranged-for.

Definition in file range.h.

Function Documentation

◆ make_range() [1/2]

template<typename iteratort >
ranget<iteratort> make_range ( iteratort  begin,
iteratort  end 
)

Definition at line 384 of file range.h.

◆ make_range() [2/2]

template<typename containert >
auto make_range ( containert &  container) -> ranget<decltype(container.begin())>

Definition at line 390 of file range.h.