9#ifndef SQUID_SRC_BASE_ENUMITERATOR_H
10#define SQUID_SRC_BASE_ENUMITERATOR_H
22template <
typename EnumType>
46 return static_cast<EnumType
>(
current);
66template <
typename EnumType>
110template <
typename EnumType>
156template <
typename EnumType>
187template <
typename EnumType>
220template <
typename EnumType>
230template <auto First, auto Last,
class F>
234 using enumType =
decltype(First);
235 using underlyingType =
typename std::underlying_type<enumType>::type;
237 f(std::integral_constant<enumType, First>());
238 if constexpr (First < Last)
239 ConstexprForEnum<enumType(
static_cast<underlyingType
>(First) + 1), Last>(f);
constexpr void ConstexprForEnum(F &&f)
EnumRangeT< EnumType > EnumRange(EnumType begin, EnumType one_past_end)
EnumType operator*() const
bool operator==(const EnumIteratorBase &i) const
bool operator!=(const EnumIteratorBase &i) const
EnumIteratorBase(EnumType e)
std::ptrdiff_t difference_type
std::underlying_type< EnumType >::type iterator_type
std::bidirectional_iterator_tag iterator_category
EnumIterator & operator--()
EnumIterator & operator--(int)
EnumIterator & operator++(int)
EnumIterator & operator++()
ReverseEnumIterator< EnumType > reverse_iterator
EnumRangeT(EnumType first, EnumType one_past_last)
reverse_iterator rbegin() const
EnumIterator< EnumType > iterator
reverse_iterator rend() const
ReverseEnumIterator(EnumType e)
ReverseEnumIterator & operator++()
ReverseEnumIterator & operator--()
ReverseEnumIterator & operator++(int)
ReverseEnumIterator & operator--(int)