16 #define RANGE_ARG_MAX 3
24 template<
class T_>
static auto test(
void*) -> decltype(begin(declval<T_>()), std::true_type());
25 template<
class T_>
static std::false_type test(...);
31 template<
class Range>
struct iterOf {
typedef typename std::decay<decltype(honey::begin(declval<Range>()))>::
type type; };
33 #define mt_iterOf(Range) typename std::decay<decltype(honey::begin(Range))>::type
36 template<
class Range>
struct iter_endOf {
typedef typename std::decay<decltype(honey::end(declval<Range>()))>::
type type; };
38 #define mt_iter_endOf(Range) typename std::decay<decltype(honey::end(Range))>::type
43 #define mt_elemOf(Range) typename mt::removeRef<decltype(*honey::begin(Range))>::type
48 template<
class Result,
class T>
49 Result
valAt(
int cur,
int end, T&& t) {
assert(cur == end,
"Index out of pack range");
return t; }
50 template<
class Result,
class T,
class... Ts>
51 Result
valAt(
int cur,
int end, T&& t, Ts&&... ts) {
return cur == end ? t : valAt<Result>(cur+1, end, forward<Ts>(ts)...); }
53 template<
class Val,
class T>
54 int valIndex(
int cur, Val&& val, T&& t) {
return val == t ? cur : -1; }
55 template<
class Val,
class T,
class... Ts>
56 int valIndex(
int cur, Val&& val, T&& t, Ts&&... ts) {
return val == t ? cur :
valIndex(cur+1, forward<Val>(val), forward<Ts>(ts)...); }
60 template<
class Result = void,
class... Ts>
62 typename std::conditional<std::is_same<Result, void>::value,
mt::typeAt<0, Ts...>, Result>::type
65 typedef typename std::conditional<std::is_same<Result, void>::value, mt::typeAt<0, Ts...>, Result>::type Result_;
66 return priv::valAt<Result_>(0, i, forward<Ts>(ts)...);
70 template<
class Val,
class... Ts>
79 auto seqToIter(Iter&& seq) ->
typename std::enable_if<mt::isIterator<Iter>::value, Iter&&>::type
80 {
return forward<Iter>(seq); }
83 auto seqToIter(Range&& seq) ->
typename std::enable_if<mt::isRange<Range>::value,
mt_iterOf(seq)>::type
84 {
return begin(seq); }
87 template<
class T1_,
class T2_>
90 template<
class T1,
class T2>
friend class Range_;
92 typedef typename std::decay<T1_>::type
T1;
93 typedef typename std::decay<T2_>::type
T2;
96 template<
class T1,
class T2>
Range_(T1&& first, T2&& last) : _first(forward<T1>(first)), _last(forward<T2>(last)) {}
103 const T1&
begin()
const {
return _first; }
105 const T2&
end()
const {
return _last; }
106 T2&
end() {
return _last; }
114 template<
class Iter1,
class Iter2>
115 typename std::enable_if<mt::isIterator<Iter1>::value, Range_<Iter1,Iter2>>::type
119 template<
class T1,
class T2>
121 template<
class T1,
class T2>
125 template<
class T1,
class T2>
127 template<
class T1,
class T2>
131 template<
class Range>
139 #define map(...) __map()
149 OutSeq&&
map(Range&&, Seqs&&..., OutSeq&&, Func&&);
153 #define PARAMT(It) , class S##It
154 #define PARAMT_(It) , class S##It##_
155 #define PARAMT_SPEC(It) , S##It##_
156 #define PARAM(It) , S##It&& seq##It
157 #define SEQTOITER(It) auto it##It = seqToIter(seq##It);
158 #define NEXT(It) , ++it##It
159 #define ARG(It) , *it##It
160 #define FORWARDT(It) , typename std::decay<S##It>::type
161 #define FORWARD(It) , forward<S##It>(seq##It)
165 template<
class Range,
class OutSeq,
class... Seqs>
struct map_impl;
171 template<class Range_, class OutSeq_ ITERATE_(1,It,PARAMT_)> \
172 struct map_impl<Range_, OutSeq_ ITERATE_(1,It,PARAMT_SPEC)> \
174 template<class Range ITERATE_(1,It,PARAMT), class OutSeq, class Func> \
175 static OutSeq&& func(Range&& range ITERATE_(1,It,PARAM), OutSeq&& out, Func&& f) \
177 auto it = begin(range); \
178 auto last = end(range); \
179 ITERATE_(1,It,SEQTOITER) \
180 auto out_it = seqToIter(out); \
181 for (; it != last; ++it ITERATE_(1,It,NEXT), ++out_it) \
182 *out_it = f(*it ITERATE_(1,It,ARG)); \
183 return forward<OutSeq>(out); \
188 template<class Range ITERATE_(1,It,PARAMT), class OutSeq, class Func> \
189 OutSeq&& map(Range&& range ITERATE_(1,It,PARAM), OutSeq&& out, Func&& f) \
191 return priv::map_impl< typename std::decay<Range>::type, typename std::decay<OutSeq>::type \
192 ITERATE_(1,It,FORWARDT)> \
193 ::func( forward<Range>(range) ITERATE_(1,It,FORWARD), \
194 forward<OutSeq>(out), forward<Func>(f)); \
213 #define reduce(...) __reduce()
223 Accum
reduce(Range&&, Seqs&&..., Accum&& initVal, Func&&);
227 #define PARAMT(It) , class S##It
228 #define PARAMT_(It) , class S##It##_
229 #define PARAMT_SPEC(It) , S##It##_
230 #define PARAM(It) , S##It&& seq##It
231 #define SEQTOITER(It) auto it##It = seqToIter(seq##It);
232 #define NEXT(It) , ++it##It
233 #define ARG(It) , *it##It
234 #define FORWARDT(It) , typename std::decay<S##It>::type
235 #define FORWARD(It) , forward<S##It>(seq##It)
239 template<
class Range,
class Accum,
class... Seqs>
struct reduce_impl;
245 template<class Range_, class Accum_ ITERATE_(1,It,PARAMT_)> \
246 struct reduce_impl<Range_, Accum_ ITERATE_(1,It,PARAMT_SPEC)> \
248 template<class Range ITERATE_(1,It,PARAMT), class Accum, class Func> \
249 static Accum_ func(Range&& range ITERATE_(1,It,PARAM), Accum&& initVal, Func&& f) \
251 Accum_ a(forward<Accum>(initVal)); \
252 auto it = begin(range); \
253 auto last = end(range); \
254 ITERATE_(1,It,SEQTOITER) \
255 for (; it != last; ++it ITERATE_(1,It,NEXT)) \
256 a = f(a, *it ITERATE_(1,It,ARG)); \
262 template< class Range ITERATE_(1,It,PARAMT), class Accum, class Func, \
263 class Accum_ = typename std::decay<Accum>::type> \
264 Accum_ reduce(Range&& range ITERATE_(1,It,PARAM), Accum&& initVal, Func&& f) \
266 return priv::reduce_impl<typename std::decay<Range>::type, Accum_ ITERATE_(1,It,FORWARDT)> \
267 ::func( forward<Range>(range) ITERATE_(1,It,FORWARD), \
268 forward<Accum>(initVal), forward<Func>(f)); \
287 #define find(...) __find()
296 Iter
find(Range&&, Seqs&&..., Func&& pred);
300 #define PARAMT(It) , class S##It
301 #define PARAM(It) , S##It&& seq##It
302 #define SEQTOITER(It) auto it##It = seqToIter(seq##It);
303 #define NEXT(It) , ++it##It
304 #define ARG(It) , *it##It
307 template<class Range ITERATE_(1,It,PARAMT), class Func> \
308 auto find(Range&& range ITERATE_(1,It,PARAM), Func&& pred) -> mt_iterOf(range) \
310 auto it = begin(range); \
311 auto last = end(range); \
312 ITERATE_(1,It,SEQTOITER) \
313 for (; it != last; ++it ITERATE_(1,It,NEXT)) \
314 if (pred(*it ITERATE_(1,It,ARG))) break; \
330 #define filter(...) __filter()
331 #define FilterIter int*
337 Range_<FilterIter, FilterIter>
filter(Range&&, Seqs&&..., Func&& pred);
341 #define PARAMT(It) , class S##It
342 #define PARAM(It) , S##It&& seq##It
343 #define PARAM_REF(It) , const S##It& seq##It
344 #define SEQTOITER_PARAMT(It) , decltype(seqToIter(seq##It))
345 #define SEQTOITER(It) , seqToIter(seq##It)
346 #define MEMBER(It) S##It _seq##It;
347 #define MEMBER_INIT(It) , _seq##It(seq##It)
348 #define NEXT(It) , ++_seq##It
349 #define ARG(It) , *_seq##It
352 template<class Range ITERATE_(1,It,PARAMT), class Func> \
353 class FilterIter##It \
356 typedef typename mt::iterOf<Range>::type Iter; \
357 typedef typename mt::iter_endOf<Range>::type IterEnd; \
358 typedef std::forward_iterator_tag iterator_category; \
359 typedef typename std::iterator_traits<Iter>::value_type value_type; \
360 typedef typename std::iterator_traits<Iter>::difference_type difference_type; \
361 typedef typename std::iterator_traits<Iter>::pointer pointer; \
362 typedef typename std::iterator_traits<Iter>::reference reference; \
364 FilterIter##It(const IterEnd& end, const Func& pred) : _it(end), _itEnd(end), _pred(pred) {} \
366 FilterIter##It(const Iter& begin, const IterEnd& end ITERATE_(1,It,PARAM_REF), const Func& pred) : \
367 _it(begin), _itEnd(end) ITERATE_(1,It,MEMBER_INIT), _pred(pred) { next(); } \
369 FilterIter##It& operator++() \
371 assert(_it != _itEnd); \
372 ++_it ITERATE_(1,It,NEXT); \
376 FilterIter##It operator++(int) { auto tmp = *this; ++*this; return tmp; } \
378 bool operator==(const FilterIter##It& rhs) const { return _it == rhs._it; } \
379 bool operator!=(const FilterIter##It& rhs) const { return !operator==(rhs); } \
381 reference operator*() const { return *_it; } \
382 pointer operator->() const { return _it.operator->(); } \
383 operator Iter() const { return _it; } \
388 for (; _it != _itEnd; ++_it ITERATE_(1,It,NEXT)) \
389 if (_pred(*_it ITERATE_(1,It,ARG))) break; \
394 ITERATE_(1,It,MEMBER) \
398 template<class Range ITERATE_(1,It,PARAMT), class Func> \
399 auto filter(Range&& range ITERATE_(1,It,PARAM), Func&& pred) -> \
400 Range_< FilterIter##It<Range ITERATE_(1,It,SEQTOITER_PARAMT), Func>, \
401 FilterIter##It<Range ITERATE_(1,It,SEQTOITER_PARAMT), Func>> \
403 typedef FilterIter##It<Range ITERATE_(1,It,SEQTOITER_PARAMT), Func> FilterIter; \
404 return honey::range(FilterIter(begin(range), end(range) ITERATE_(1,It,SEQTOITER), pred), \
405 FilterIter(end(range), pred)); \
412 #undef SEQTOITER_PARAMT
423 template<
class Range>
427 template<
class Range>
431 template<
class Range,
class Alloc>
467 operator T()
const {
return _i; }
474 template<class Int, class Int2, class Int_ = typename std::common_type<Int,Int2>::type>
475 typename std::enable_if<std::is_integral<Int_>::value, Range_<IntIter<Int_>, IntIter<Int_>>>::type
484 typename std::enable_if<std::is_integral<Int>::value, Range_<IntIter<Int>, IntIter<Int>>>::type
520 operator T()
const {
return _i; }
528 template<class Int, class Int2, class Int3, class Int_ = typename std::common_type<Int,Int2,Int3>::type>
529 typename std::enable_if<std::is_integral<Int_>::value, Range_<IntStepIter<Int_>, IntStepIter<Int_>>>::type
530 range(Int begin, Int2 end, Int3 step)
534 Int_ end_ = step > 0 ? (end < begin ? begin : end) : (end > begin ? begin : end);
535 Int_ dif = end_ - begin;
553 RealIter(T begin, T step, Int i) : _begin(begin), _step(step), _i(i) {}
572 reference
operator*()
const {
return _begin + _i*_step; }
573 operator T()
const {
return _begin + _i*_step; }
582 template<class Real, class Real2, class Real3, class Real_ = typename std::common_type<Real,Real2,Real3>::type>
583 typename std::enable_if<std::is_floating_point<Real_>::value, Range_<RealIter<Real_>, RealIter<Real_>>>::type
588 Real_ end_ = step > 0 ? (end < begin ? begin : end) : (end > begin ? begin : end);
595 template<
class Iter, szt I,
class IterCategory =
typename Iter::iterator_category>
598 template<
class Iter, szt I>
603 typedef decltype(get<I>(*Iter())) reference;
619 operator Iter()
const {
return _i; }
625 template<
class Iter, szt I>
644 template<
class Range,
class Iter>
651 typedef typename std::iterator_traits<Iter>::value_type
value_type;
653 typedef typename std::iterator_traits<Iter>::pointer
pointer;
654 typedef typename std::iterator_traits<Iter>::reference
reference;
656 RingIter(
const RangeIter& begin,
const RangeIterEnd& end,
const Iter& cur,
bool bEnd =
false) :
657 _begin(begin), _end(end), _curBegin(cur), _cur(cur), _bEnd(bEnd)
659 if (!_bEnd) _bEnd = _begin == _end;
660 assert(_bEnd || _cur != _end);
667 if (_cur == _end) _cur = _begin;
668 if (_cur == _curBegin) _bEnd =
true;
675 assert(_bEnd || _cur != _curBegin);
676 if (_bEnd) _bEnd =
false;
677 if (_cur == _begin) _cur = _end;
690 operator const Iter&()
const {
return _cur; }
692 const Iter&
iter()
const {
return _cur; }
703 template<
class Range,
class Iter>
T value_type
Definition: Range.h:547
bool operator<(const IntIter &rhs) const
Definition: Range.h:461
bool operator!=(const IntStepIter &rhs) const
Definition: Range.h:513
IntIter & operator-=(difference_type rhs)
Definition: Range.h:454
bool operator>=(const IntIter &rhs) const
Definition: Range.h:464
reference operator*() const
Definition: Range.h:688
std::bidirectional_iterator_tag iterator_category
Definition: Range.h:632
const T2 & end() const
Definition: Range.h:105
TupleIter & operator++()
Definition: Range.h:637
bool operator<=(const IntStepIter &rhs) const
Definition: Range.h:516
RingIter operator--(int)
Definition: Range.h:683
TupleIter operator--(int)
Definition: Range.h:640
mt::removeRef< decltype(*honey::begin(declval< Range >)))>::type type
Definition: Range.h:41
reference operator*() const
Definition: Range.h:617
bool operator==(const TupleIter &rhs) const
Definition: Range.h:614
bool operator!=(const RealIter &rhs) const
Definition: Range.h:566
RealIter operator--(int)
Definition: Range.h:558
std::iterator_traits< Iter >::pointer pointer
Definition: Range.h:653
std::random_access_iterator_tag iterator_category
Definition: Range.h:440
IntStepIter operator-(difference_type rhs) const
Definition: Range.h:509
IntIter operator+(difference_type rhs) const
Definition: Range.h:455
bool operator==(const RingIter &rhs) const
Definition: Range.h:685
T reference
Definition: Range.h:550
std::decay< decltype(honey::end(declval< Range >)))>::type type
Definition: Range.h:36
RingIter operator++(int)
Definition: Range.h:682
IntIter & operator++()
Definition: Range.h:449
IntStepIter operator++(int)
Definition: Range.h:504
Range_ & operator=(Range_< T1, T2 > &&rhs)
Definition: Range.h:101
IntStepIter operator+(difference_type rhs) const
Definition: Range.h:508
#define mt_iter_endOf(Range)
iter_endOf for values
Definition: Range.h:38
bool operator<(const IntStepIter &rhs) const
Definition: Range.h:514
std::forward_iterator_tag iterator_category
Definition: Range.h:602
Iter find(Range &&, Seqs &&..., Func &&pred)
Find an element in a series of sequences.
auto ringRange(Range &&range, const Iter &cur) -> Range_< RingIter< Range, Iter >, RingIter< Range, Iter >>
Create an iterator adapter range that does one full cyclic loop starting at cur through the range...
Definition: Range.h:704
Wrapper around an iterator with tuple value type. When dereferenced returns I'th element.
Definition: Range.h:596
int valIndex(Val &&val, Ts &&...ts)
Get index of first matching value in parameter pack, returns -1 if not found.
Definition: Range.h:71
void delete_(T *&p)
Destruct object, free memory and set pointer to null.
Definition: Allocator.h:75
bool operator>=(const IntStepIter &rhs) const
Definition: Range.h:517
IntStepIter & operator++()
Definition: Range.h:502
Range_(Range_< T1, T2 > &&rhs)
Definition: Range.h:98
RealIter & operator-=(difference_type rhs)
Definition: Range.h:560
mt::removeRef< reference >::type value_type
Definition: Range.h:604
RealIter operator++(int)
Definition: Range.h:557
reference operator*() const
Definition: Range.h:572
IntIter & operator--()
Definition: Range.h:450
Get range element type.
Definition: Range.h:41
Accum reduce(Range &&, Seqs &&..., Accum &&initVal, Func &&)
Accumulate a series of sequences into an output.
T value_type
Definition: Range.h:441
difference_type operator-(const IntStepIter &rhs) const
Definition: Range.h:510
bool operator!=(const RingIter &rhs) const
Definition: Range.h:686
std::enable_if< mt::isIterator< Iter1 >::value, Range_< Iter1, Iter2 > >::type range(Iter1 &&first, Iter2 &&last)
Range from iterators [first, last)
Definition: Range.h:116
Iter _i
Definition: Range.h:622
std::random_access_iterator_tag iterator_category
Definition: Range.h:493
pointer operator->() const
Definition: Range.h:689
const T & reference
Definition: Range.h:444
value_type * pointer
Definition: Range.h:606
IntStepIter & operator-=(difference_type rhs)
Definition: Range.h:507
std::decay< T1_ >::type T1
Definition: Range.h:92
IntIter & operator+=(difference_type rhs)
Definition: Range.h:453
const Iter & iter() const
Definition: Range.h:692
std::iterator_traits< Iter >::reference reference
Definition: Range.h:654
difference_type operator-(const IntIter &rhs) const
Definition: Range.h:457
TupleIter & operator++()
Definition: Range.h:611
TupleIter(const Iter &i)
Definition: Range.h:635
Check if type is a range or a reference to one. A range is a type where std::begin(range) is a valid ...
Definition: Range.h:22
IntStepIter & operator+=(difference_type rhs)
Definition: Range.h:506
reference operator*() const
Definition: Range.h:519
const T * pointer
Definition: Range.h:496
RealIter & operator++()
Definition: Range.h:555
T difference_type
Definition: Range.h:442
std::decay< decltype(honey::begin(declval< Range >)))>::type type
Definition: Range.h:31
bool operator==(const RealIter &rhs) const
Definition: Range.h:565
RealIter operator+(difference_type rhs) const
Definition: Range.h:561
#define RANGE_ARG_MAX
Max args for range related variable argument functions.
Definition: Range.h:16
Range_(T1 &&first, T2 &&last)
Definition: Range.h:96
bool operator==(const IntStepIter &rhs) const
Definition: Range.h:512
const T * pointer
Definition: Range.h:443
#define mt_iterOf(Range)
iterOf for values
Definition: Range.h:33
T * pointer
Definition: Range.h:549
const T1 & begin() const
Definition: Range.h:103
mt::iter_endOf< Range >::type RangeIterEnd
Definition: Range.h:649
Int difference_type
Definition: Range.h:548
T difference_type
Definition: Range.h:495
Ring iterator. See ringRange() to create.
Definition: Range.h:645
#define assert(...)
Forwards to assert_#args. See assert_1(), assert_2().
Definition: Debug.h:24
Range_ & operator=(const Range_< T1, T2 > &rhs)
Definition: Range.h:100
RealIter & operator+=(difference_type rhs)
Definition: Range.h:559
IntIter operator--(int)
Definition: Range.h:452
std::random_access_iterator_tag iterator_category
Definition: Range.h:546
bool operator>=(const RealIter &rhs) const
Definition: Range.h:570
szt countOf(Range &&range)
Count number of elements in range.
Definition: Range.h:424
std::iterator_traits< Iter >::difference_type difference_type
Definition: Range.h:652
IntIter(T i)
Definition: Range.h:447
void deleteRange(Range &&range)
Delete all elements in range.
Definition: Range.h:428
TupleIter & operator--()
Definition: Range.h:638
std::decay< T2_ >::type T2
Definition: Range.h:93
pointer operator->() const
Definition: Range.h:618
RealIter & operator--()
Definition: Range.h:556
std::conditional< std::is_same< Result, void >::value, mt::typeAt< 0, Ts... >, Result >::type valAt(int i, Ts &&...ts)
Get value at index of parameter pack. All types must be convertible to Result, which defaults to the ...
Definition: Range.h:63
float Real
Real number type. See Real_ for real number operations and constants.
Definition: Real.h:21
Numeric type information, use numeral() to get instance safely from a static context.
Definition: Numeral.h:17
TupleIter operator++(int)
Definition: Range.h:612
bool operator!=(const IntIter &rhs) const
Definition: Range.h:460
size_t szt
Size type, shorthand for size_t.
Definition: Core.h:90
RingIter & operator--()
Definition: Range.h:672
bool operator<=(const IntIter &rhs) const
Definition: Range.h:463
bool operator>(const RealIter &rhs) const
Definition: Range.h:568
T1 & begin()
Definition: Range.h:104
Real number iterator. See range(Real, Real, Real) to create.
Definition: Range.h:542
bool operator==(const IntIter &rhs) const
Definition: Range.h:459
Get range iterator end type.
Definition: Range.h:36
IntIter operator++(int)
Definition: Range.h:451
Integer iterator with step size. See range(int, int, int) to create.
Definition: Range.h:490
#define ITERATE(Min, Max, Func)
Iterate calling Func(It, Args...) over range [Min, Max], where Min >= 0 and Max <= ITERATE_MAX...
Definition: Preprocessor.h:58
Numeral< Real >::Real_ Real_
Operations and constants for Real type. See Float_, Double_.
Definition: Real.h:25
bool operator<=(const RealIter &rhs) const
Definition: Range.h:569
Get range iterator begin type.
Definition: Range.h:31
TupleIter operator++(int)
Definition: Range.h:639
Iterator range. See range(Iter1&&, Iter2&&) to create.
Definition: Range.h:88
static const bool value
Definition: Range.h:27
Range_< FilterIter, FilterIter > filter(Range &&, Seqs &&..., Func &&pred)
Filter a range by ignoring undesired elements.
IntStepIter(T i, T step)
Definition: Range.h:500
IntIter operator-(difference_type rhs) const
Definition: Range.h:456
bool operator!=(const TupleIter &rhs) const
Definition: Range.h:615
RealIter operator-(difference_type rhs) const
Definition: Range.h:562
reference operator*() const
Definition: Range.h:466
mt::iterOf< Range >::type RangeIter
Definition: Range.h:648
IntStepIter & operator--()
Definition: Range.h:503
bool operator==(const String &lhs, const String &rhs)
Definition: String.h:139
difference_type operator-(const RealIter &rhs) const
Definition: Range.h:563
auto seqToIter(Iter &&seq) -> typename std::enable_if< mt::isIterator< Iter >::value, Iter && >::type
Convert a sequence to a forward iterator. Overload for iterator type. Returns the iterator itself...
Definition: Range.h:79
std::bidirectional_iterator_tag iterator_category
Definition: Range.h:650
RealIter(T begin, T step, Int i)
Definition: Range.h:553
std::iterator_traits< Iter >::value_type value_type
Definition: Range.h:651
T value_type
Definition: Range.h:494
Incremental integer iterator (step size = 1). See range(int, int) to create.
Definition: Range.h:437
const T & reference
Definition: Range.h:497
bool operator<(const RealIter &rhs) const
Definition: Range.h:567
bool operator>(const IntIter &rhs) const
Definition: Range.h:462
std::iterator_traits< Iter >::difference_type difference_type
Definition: Range.h:605
T2 & end()
Definition: Range.h:106
Global Honeycomb namespace.
Range_(const Range_< T1, T2 > &rhs)
Definition: Range.h:97
IntStepIter operator--(int)
Definition: Range.h:505
RingIter(const RangeIter &begin, const RangeIterEnd &end, const Iter &cur, bool bEnd=false)
Definition: Range.h:656
bool operator>(const IntStepIter &rhs) const
Definition: Range.h:515
RingIter & operator++()
Definition: Range.h:663
OutSeq && map(Range &&, Seqs &&..., OutSeq &&, Func &&)
Transform a series of sequences into an output.
auto reversed(Range &&range) -> Range_< std::reverse_iterator< mt_iterOf(range)>, std::reverse_iterator< mt_iter_endOf(range)>>
Reverse a range. Begin/End iterators must be bidirectional.
Definition: Range.h:132