Last Updated: May 22, 2026
The <algorithm> header has a second large family beyond searching: algorithms that produce a modified version of a range. They cover the transformations that would otherwise need loops: copying, mapping values, replacing matches, filling, reversing, and removing. This chapter walks through each operation, the output iterator concept that makes them composable, and the erase-remove idiom that is a common source of confusion.