mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 12:27:42 +02:00
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:
@ -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]
|
||||
|
||||
|
Reference in New Issue
Block a user