Skip to content

Commit 9e83af9

Browse files
committed
do not access member of opstate after call to set_value
1 parent e02ecf6 commit 9e83af9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/exec/sequence/iterate.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ namespace exec {
5353
__operation_base<_Iterator, _Sentinel>* __parent_;
5454

5555
void start() & noexcept {
56-
stdexec::set_value(static_cast<_ItemRcvr&&>(__rcvr_), *__parent_->__iterator_);
57-
++__parent_->__iterator_;
56+
auto& __iter = __parent_->__iterator_;
57+
stdexec::set_value(static_cast<_ItemRcvr&&>(__rcvr_), *__iter);
58+
++__iter;
5859
}
5960
};
6061
};

0 commit comments

Comments
 (0)