cpp/algorithm/ranges/copy

Copies the elements in the range, defined by, to another range beginning at. @1@ Copies all elements in the range starting from  and proceeding to. The behavior is undefined if is within the range. In this case, ranges may be used instead. @3@ Only copies the elements for which the predicate returns. The relative order of the elements that are copied is preserved. The behavior is undefined if the source and the destination ranges overlap. @2,4@ Same as, but uses as the source range, as if using  as  and  as.

Return value
A ranges containing an input iterator equal to and an output iterator past the last element copied.

Complexity
@1-2@ Exactly assignments.

@3-4@ Exactly applications of the predicate and projection, between  and  assignments (assignment for every element for which predicate returns, dependent on predicate and input data).