C++ Language/Std/Stl/Algorithms/Modifying/Copying

If you have an appropriate callable-object, then copying can be conditional, with item-by-item testing of that condition:.

Additional information about copying algorithms (includes interactive examples)