From 35cb0cb28b814ff49e3c36594b612d925fd3267b Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Wed, 27 Nov 2024 02:09:08 +0100 Subject: [PATCH] libutil: make enumerate iter deref non-const there's no need for this. no concept requires unary deref to be const. Change-Id: I4e4592c5917382ad2dcc70e5d3f12662614b2fd1 --- lix/libutil/types.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lix/libutil/types.hh b/lix/libutil/types.hh index 1e3e4acea..05523b9ed 100644 --- a/lix/libutil/types.hh +++ b/lix/libutil/types.hh @@ -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