Skip to content

Commit

Permalink
[move.sentinel] Use "std::move" in example for correctness (#6043)
Browse files Browse the repository at this point in the history
  • Loading branch information
hewillk committed Jan 24, 2023
1 parent b9d35e8 commit b5d9d4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5259,7 +5259,8 @@
@\libconcept{indirect_unary_predicate}@<I> Pred>
requires @\libconcept{indirectly_movable}@<I, O>
void move_if(I first, S last, O out, Pred pred) {
ranges::copy_if(move_iterator<I>{first}, move_sentinel<S>{last}, out, pred);
ranges::copy_if(move_iterator<I>{std::move(first)}, move_sentinel<S>{last},
std::move(out), pred);
}
\end{codeblock}
\end{example}
Expand Down

0 comments on commit b5d9d4f

Please sign in to comment.