18#ifndef WPIUTIL_WPI_ITERATOR_RANGE_H
19#define WPIUTIL_WPI_ITERATOR_RANGE_H
27template <
typename From,
typename To,
typename =
void>
30template <
typename From,
typename To>
34 std::declval<std::add_rvalue_reference_t<From>>()))>> : std::true_type {
41template <
typename IteratorT>
43 IteratorT begin_iterator, end_iterator;
46#if __GNUC__ == 7 || (__GNUC__ == 8 && __GNUC_MINOR__ < 4)
49 template <
typename Container>
60 : begin_iterator(
std::move(begin_iterator)),
61 end_iterator(
std::move(end_iterator)) {}
63 IteratorT
begin()
const {
return begin_iterator; }
64 IteratorT
end()
const {
return end_iterator; }
65 bool empty()
const {
return begin_iterator == end_iterator; }
68template <
typename Container>
A range adaptor for a pair of iterators.
Definition iterator_range.h:42
iterator_range(Container &&c)
Definition iterator_range.h:56
IteratorT end() const
Definition iterator_range.h:64
iterator_range(IteratorT begin_iterator, IteratorT end_iterator)
Definition iterator_range.h:59
bool empty() const
Definition iterator_range.h:65
IteratorT begin() const
Definition iterator_range.h:63
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
decltype(adl_begin(std::declval< RangeT & >())) IterOfRange
Definition ADL.h:126
Foonathan namespace.
Definition ntcore_cpp.h:26
iterator_range(Container &&) -> iterator_range< wpi::detail::IterOfRange< Container > >
constexpr auto adl_end(RangeT &&range) -> decltype(adl_detail::end_impl(std::forward< RangeT >(range)))
Returns the end iterator to range using std::end and functions found through Argument-Dependent Looku...
Definition ADL.h:86
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Definition iterator_range.h:76
constexpr auto adl_begin(RangeT &&range) -> decltype(adl_detail::begin_impl(std::forward< RangeT >(range)))
Returns the begin iterator to range using std::begin and function found through Argument-Dependent Lo...
Definition ADL.h:78
Definition iterator_range.h:28
void void_t
Definition base.h:321