11template <typename T, typename TIter = decltype(std::begin(std::declval<T>())),
12 typename =
decltype(std::end(std::declval<T>()))>
19 bool operator!=(
const iterator &other)
const {
return iter != other.iter; }
25 auto operator*()
const {
return std::tie(i, *iter); }
27 struct iterable_wrapper
30 auto begin() {
return iterator{0, std::begin(iterable)}; }
31 auto end() {
return iterator{0, std::end(iterable)}; }
33 return iterable_wrapper{std::forward<T>(iterable)};
constexpr auto enumerate(T &&iterable)
Definition enumerate.h:13