Brian Silverman | 598d029 | 2018-08-04 23:56:47 -0700 | [diff] [blame^] | 1 | [/ |
| 2 | Copyright 2010 Neil Groves |
| 3 | Distributed under the Boost Software License, Version 1.0. |
| 4 | (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | /] |
| 6 | [section:irange irange] |
| 7 | |
| 8 | [heading Prototype] |
| 9 | |
| 10 | `` |
| 11 | template<class Integer> |
| 12 | iterator_range< range_detail::integer_iterator<Integer> > |
| 13 | irange(Integer last); |
| 14 | |
| 15 | template<class Integer> |
| 16 | iterator_range< range_detail::integer_iterator<Integer> > |
| 17 | irange(Integer first, Integer last); |
| 18 | |
| 19 | template<class Integer, class StepSize> |
| 20 | iterator_range< range_detail::integer_iterator_with_step<Integer, StepSize> > |
| 21 | irange(Integer first, Integer last, StepSize step_size); |
| 22 | `` |
| 23 | |
| 24 | [heading Description] |
| 25 | |
| 26 | `irange` is a function to generate an Integer Range. |
| 27 | |
| 28 | `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. |
| 29 | |
| 30 | [heading Definition] |
| 31 | |
| 32 | Defined in the header file `boost/range/irange.hpp` |
| 33 | |
| 34 | [heading Requirements] |
| 35 | |
| 36 | # `Integer` is a model of the `Integer` Concept. |
| 37 | # `StepSize` is a model of the `SignedInteger` Concept. |
| 38 | |
| 39 | [heading Complexity] |
| 40 | |
| 41 | Constant. Since this function generates a new range the most significant performance cost is incurred through the iteration of the generated range. |
| 42 | |
| 43 | [endsect] |