first_owned
Copies referenced elements; moves when an iterator yields an rvalue.
Source and package
- Qualified name
-
libtmux::first _owned - Namespace
- libtmux
- Package
- libtmux-cxx
- Source
- include/libtmux/cardinality.hpp
- template <std::
ranges:: Range> requires std::input _range constructible < std::_from ranges:: <Range>, std::range _value _t ranges:: <Range>> [[range _reference _t C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] std::optional < std::ranges:: <Range>> first_owned(Range&& range);range _value _t -
Description#
A temporary view over an lvalue container therefore leaves that container intact. Owning the element does not extend storage borrowed by its own members.