The C++23 std::views::as_rvalue is the view equivalent of the C++11 iterator adaptor std::move_iterator.
The elements of the view are presented as rvalues, which is useful when the source data can be consumed, thus avoiding unnecessary copies.
Click to open in Compiler Explorer.
Leave a comment