![]() |
Home | Libraries | People | FAQ | More |
iterator_range presents
a sub-range of its underlying sequence delimited by a pair of iterators.
#include <boost/fusion/sequence/view/iterator_range.hpp>
template <typename First, typename Last> struct iterator_range;
Notation
IRiterator_range type
fFirst
lLast
ir,
ir2iterator_range
Semantics of an expression is defined only where it differs from, or is not defined in Forward Sequence.
| Expression | Semantics |
|---|---|
IR(f, l) |
Creates
an iterator_range
given iterators, f
and l. |
IR(ir) |
Copy
constructs an iterator_range
from another iterator_range,
ir. |
ir =
ir2 |
Assigns
to a iterator_range,
ir, from another
iterator_range,
ir2. |
char const* s = "Ruby"; typedefvector<int, char, double, char const*> vector_type; vector_type vec(1, 'x', 3.3, s); typedefresult_of::begin<vector_type>::type A; typedefresult_of::end<vector_type>::type B; typedefresult_of::next<A>::type C; typedefresult_of::prior<B>::type D; C c(vec); D d(vec); iterator_range<C, D> range(c, d); std::cout << range << std::endl;
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |