Back to Arangodb

iterator_range

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/iterator-range.html

3.12.9.12.8 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Views / iterator_range |

iterator_range

Synopsis

template<
      typename First
    , typename Last
    >
struct[iterator\_range](./iterator-range.html){
    //_unspecified_//_..._};

Description

A view into subset of sequence elements identified by a pair of iterators.

#include <[boost/mpl/fold.hpp](../../../../boost/mpl/fold.hpp)>

Model of

Parameters

ParameterRequirementDescription
First, LastForward IteratorIterators identifying the view's boundaries.

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in Forward Sequence.

In the following table, v is an instance of iterator_range, first and last are iterators into a Forward Sequence, and [first, last) form a valid range.

ExpressionSemantics
[iterator\_range](./iterator-range.html)<first,last>[iterator\_range](./iterator-range.html)<first,last>::type

| A lazy sequence all the elements in the range [first, last). |

Example

typedef[range\_c](./range-c.html)<int,0,100> r;
typedef advance_c<[begin](./begin.html)<r>::type,10 >::type first;
typedef advance_c<[end](./end.html)<r>::type,-10 >::type last;[BOOST\_MPL\_ASSERT](./assert.html)(([equal](./equal.html)<[iterator\_range](./iterator-range.html)<first,last>
    ,[range\_c](./range-c.html)<int,10,90>
    > ));

See also

Sequences, Views, filter_view, transform_view, joint_view, zip_view, max_element

| Prev Next | Back Along | Up Home | Full TOC |

Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |