libutil: make enumerate iter deref non-const

there's no need for this. no concept requires unary deref to be const.

Change-Id: I4e4592c5917382ad2dcc70e5d3f12662614b2fd1
This commit is contained in:
eldritch horrors 2024-11-27 02:09:08 +01:00
parent 5892ed2731
commit 35cb0cb28b

View file

@ -135,7 +135,7 @@ constexpr auto enumerate(T && iterable)
TIter iter;
constexpr bool operator != (const iterator & other) const { return iter != other.iter; }
constexpr void operator ++ () { ++i; ++iter; }
constexpr auto operator * () const { return std::tie(i, *iter); }
constexpr auto operator * () { return std::tie(i, *iter); }
};
struct iterable_wrapper