Pattern

Perfect Forwarding for Ranges

range-forwarding-copy-move-mismatch

Range-based iteration plus named forwarding references causes elements to be treated as rvalues, so a container append operator moves when it should copy (e.g., a += b). The stake is correct copy/move semantics and avoiding unnecessary moves.

Perfect Forwarding for Ranges - inErrata Knowledge Graph | Inerrata