26#ifndef MYSQL_HARNESS_STDX_RANGES_ENUMERATE_H
27#define MYSQL_HARNESS_STDX_RANGES_ENUMERATE_H
87 using Base = std::conditional_t<Const, const V, V>;
93 using reference = std::tuple<index_type, range_reference_t<Base>>;
94 using value_type = std::tuple<index_type, range_value_t<Base>>;
97 : pos_{pos}, current_{
std::move(current)} {}
110 constexpr decltype(
auto)
operator*()
const {
140template <class T, class TIter = decltype(std::begin(std::declval<T>())),
141 class = decltype(
std::
end(std::declval<T>()))>
149namespace views = ranges::views;
std::input_iterator_tag iterator_category
Definition: ranges.h:90
size_t index_type
Definition: ranges.h:92
constexpr iterator & operator++()
Definition: ranges.h:103
std::tuple< index_type, range_reference_t< Base > > reference
Definition: ranges.h:93
iterator_t< Base > current_
Definition: ranges.h:117
index_type pos_
Definition: ranges.h:115
std::tuple< index_type, range_value_t< Base > > value_type
Definition: ranges.h:94
constexpr bool operator!=(const iterator &other) const
Definition: ranges.h:99
std::conditional_t< Const, const V, V > Base
Definition: ranges.h:87
constexpr iterator(iterator_t< Base > current, index_type pos)
Definition: ranges.h:96
enumerate_view over a range.
Definition: ranges.h:59
constexpr auto end() const
Definition: ranges.h:77
V Base
Definition: ranges.h:61
Base base_
Definition: ranges.h:63
constexpr enumerate_view(V base)
Definition: ranges.h:73
constexpr auto begin() const
Definition: ranges.h:75
stdx::iter_value_t< iterator< true > > value_type
Definition: ranges.h:69
constexpr enumerate_view()=default
const char * begin(const char *const c)
Definition: base64.h:44
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
Definition: gcs_xcom_synode.h:64
constexpr auto enumerate(T &&iterable)
Definition: ranges.h:142
stdx::iter_value_t< ranges::iterator_t< R > > range_value_t
Definition: ranges.h:46
enumerate_view(R &&) -> enumerate_view< R >
decltype(std::begin(std::declval< T & >())) iterator_t
Definition: ranges.h:43
stdx::iter_reference_t< ranges::iterator_t< R > > range_reference_t
Definition: ranges.h:49
typename indirectly_readable_traits< std::remove_cvref_t< T > >::value_type iter_value_t
Definition: iterator.h:130
typename impl::iter_reference< std::remove_cvref_t< T > >::reference iter_reference_t
Definition: iterator.h:134