Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

irange

Prototype

template<class Integer>
iterator_range< range_detail::integer_iterator<Integer> >
irange(Integer last);

template<class Integer>
iterator_range< range_detail::integer_iterator<Integer> >
irange(Integer first, Integer last);

template<class Integer, class StepSize>
iterator_range< range_detail::integer_iterator_with_step<Integer, StepSize> >
irange(Integer first, Integer last, StepSize step_size);

Description

irange is a function to generate an Integer Range.

irange allows treating integers as a model of the Random Access Range Concept. It should be noted that the first and last parameters denoted a half-open range.

Definition

Defined in the header file boost/range/irange.hpp

Requirements
  1. Integer is a model of the Integer Concept.
  2. StepSize is a model of the SignedInteger Concept.
Complexity

Constant. Since this function generates a new range the most significant performance cost is incurred through the iteration of the generated range.


PrevUpHomeNext