P4346

std::movable_box: Give Users the Ranges Movable Wrapper

R1

The exposition-only class template *movable-box* is the workhorse of the range adaptors. It is how the standard library stores a predicate, a projection, or a value inside a view type and still satisfies the assignability the `view` concept demands. Every implementation ships one. Every ranges-adjacent library reimplements one. Anyone writing a conforming view outside the standard library must write one.

Authors
Steve Downey
Mailing
2026-10
Doc date
2026-10-23
Audience
LEWGLWG

Revision history

  1. 2026-10
    R1 Selected (shown above)
  2. 2026-09
    R0 LEWG

    Make `movable-box` `movable_box`