Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

function libtmux-cxx latest

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::input_range Range> requires std::constructible_from< std::ranges::range_value_t<Range>, std::ranges::range_reference_t<Range>> [[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] std::optional< std::ranges::range_value_t<Range>> first_owned(Range&& range);

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.

Type parameters
Parameters
Esc

Type to search.

Reference previewOpen reference