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;
49 template <
typename Container>
51 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:55
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
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:256
void void_t
Definition: core.h:1510
static constexpr const velocity::meters_per_second_t c(299792458.0)
Speed of light in vacuum.
decltype(adl_begin(std::declval< RangeT & >())) IterOfRange
Definition: ADL.h:94
Definition: ntcore_cpp.h:26
iterator_range(Container &&) -> iterator_range< 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:70
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Definition: iterator_range.h:75
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:62
Definition: iterator_range.h:28