Skip to content

Commit b5d9d4f

Browse files
authored
[move.sentinel] Use "std::move" in example for correctness (#6043)
1 parent b9d35e8 commit b5d9d4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/iterators.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5259,7 +5259,8 @@
52595259
@\libconcept{indirect_unary_predicate}@<I> Pred>
52605260
requires @\libconcept{indirectly_movable}@<I, O>
52615261
void move_if(I first, S last, O out, Pred pred) {
5262-
ranges::copy_if(move_iterator<I>{first}, move_sentinel<S>{last}, out, pred);
5262+
ranges::copy_if(move_iterator<I>{std::move(first)}, move_sentinel<S>{last},
5263+
std::move(out), pred);
52635264
}
52645265
\end{codeblock}
52655266
\end{example}

0 commit comments

Comments
 (0)