Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Concept Run

Run

Description

A Run represents an (offset, end_offset) 2-tuple, which represents a half-open range of numbers.

Associated types

  • offset_type

    boost::result_of<boost::range_run_storage::op::offset(boost::add_reference<R>::type)>::type

    The type of the offset and end_offset values.

  • length_type

    boost::result_of<boost::range_run_storage::op::length(boost::add_reference<R>::type)>::type

    The type of the run length; usually an unsigned version of the offset_type, if the offset_type is integral.

  • is_unit_length

    boost::range_run_storage::traits::is_unit_length<R>::type

    Either mpl::true_ or mpl::false_ depending on whether or not this Run is indivisible.

Notation

R
A type playing the role of run-type in the Run concept.
r
Object of type R

Valid expressions

Name Expression Type Semantics

Offset

boost::range_run_storage::offset(r)

offset_type

Returns the start offset of the Run.

End Offset

boost::range_run_storage::end_offset(r)

offset_type

Returns the end offset of the Run.

Length

boost::range_run_storage::length(r)

length_type

Returns the length of the Run.

Empty

boost::range_run_storage::empty(r)

Convertible to bool

Returns true if the Run is empty, false otherwise.

Models

  • std::pair<int, int>

PrevUpHomeNext