irange: introduce one-parameter variant of irange

this simplifies the use of boost::irange, as boost::irange( 0, foo );
may compile or not depending on the platform-specific integer type of
foo, requiring an explicit cast of 0 to decltype(foo).
This commit is contained in:
Tim Blechmann
2016-01-17 11:40:55 +01:00
parent 5a37aa4e98
commit bb43887430
3 changed files with 59 additions and 11 deletions

View File

@ -10,7 +10,11 @@
``
template<class Integer>
iterator_range< range_detail::integer_iterator<Integer> >
irange(Integer first, Integer last);
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> >
@ -37,4 +41,3 @@ Defined in the header file `boost/range/irange.hpp`
Constant. Since this function generates a new range the most significant performance cost is incurred through the iteration of the generated range.
[endsect]