forked from boostorg/range
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:
1 parent
5a37aa4e98
commit
bb43887430
3 files changed
+59
-11
No files matched your search
@@ -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