Search⌘ K
AI Features

Move Ranges

Explore how to use std::move and std::move_backward to relocate ranges in C++ efficiently. Understand the roles of output and bidirectional iterators as destinations, and grasp how move semantics affect the source range after the operation.

We'll cover the following...

std::move moves the ranges forward; std::move_backward moves the ranges backwards.

move: moves the range forward:

C++
OutIt move(InpIt first, InpIt last, OutIt result)
FwdIt2 move(ExePol pol, FwdIt first, FwdIt last, Fwd2It result)

...