Skip to content

Commit a6832e3

Browse files
committed
Add non-const overloads of the * and -> for map_iteratort
This adds support for moving from the values accessible through the result of `ranget.map`.
1 parent 81e4a93 commit a6832e3

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
@@ -60,6 +60,16 @@ class map_iteratort
6060
return tmp;
6161
}
6262

63+
value_type &operator*()
64+
{
65+
return *current.get();
66+
}
67+
68+
value_type *operator->()
69+
{
70+
return &(*current.get());
71+
}
72+
6373
const value_type &operator*() const
6474
{
6575
return *current.get();

0 commit comments

Comments
 (0)