Skip to content

Commit 181becf

Browse files
committed
Add non-const overloads of the * and -> for filter_iteratort
This adds support for moving from the values accessible through the result of `ranget.filter`.
1 parent f010ebf commit 181becf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/util/range.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ class filter_iteratort
142142
return tmp;
143143
}
144144

145+
value_type &operator*()
146+
{
147+
return *underlying;
148+
}
149+
150+
value_type *operator->()
151+
{
152+
return &(*underlying);
153+
}
154+
145155
const value_type &operator*() const
146156
{
147157
return *underlying;

0 commit comments

Comments
 (0)