![]() |
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
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"; typedef vector<int, char, double, char const*> vector_type; vector_type vec(1, 'x', 3.3, s); typedef result_of::begin<vector_type>::type A; typedef result_of::end<vector_type>::type B; typedef result_of::next<A>::type C; typedef result_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-2005 Joel de Guzman, Dan Marsden |