std::indire...le_storable(3)
π NAME π
std::indirectly_movable_storable β bestie, that's literally the name, std::indirectly_movable_storable
Ok so real talk, this page comes from the C++ Standard Libary manual (yes that's how it's spelled on the tin, no I will not be fixing it, it's iconic) β and it's std::indire...le_storable(3) in the corner, they truncated it because the name is a whole paragraph, honestly relatable π
β¨ SYNOPSIS β¨
Defined in header <iterator>:
template< class In, class Out >
concept indirectly_movable_storable =
std::indirectly_movable<In, Out> &&
std::indirectly_writable<Out, std::iter_value_t<In>> &&
std::movable<std::iter_value_t<In>> &&
std::constructible_from<std::iter_value_t<In>,
std::iter_rvalue_reference_t<In>> &&
std::assignable_from<std::iter_value_t<In>&,
std::iter_rvalue_reference_t<In>>;
Since C++20 btw π
So the indirectly_movable_storable concept is out here defining the whole situationship between an indirectly_readable type and an indirectly_writable type. On top of what indirectly_movable already asks for, this one also specifies that the move from the indirectly_readable type can be performed via an intermediate object. Like, you don't just yeet the value directly β there's a little middleman obj and it's doing main character work π«Ά
πΈ Semantic requirements πΈ
In and Out model std::indirectly_movable_storable<In, Out> only if, given a dereferenceable value i of type In:
- After the definition
std::iter_value_t<In> obj(ranges::iter_move(i));,objis equal to the value previously denoted by*i, and - if
std::iter_rvalue_reference_t<In>is an rvalue reference type,*iis placed in a valid but unspecified state after the initialization ofobj.
Not me emphasizing valid but unspecified β that's the whole point, bestie. It's alive, it's legal, it's just... going through something π
π¦ Equality preservation π¦
Expressions declared in requires expressions of the standard library concepts are required to be equality-preserving (except where stated otherwise).
π SEE ALSO π
indirectly_movable(C++20) β specifies that values may be moved from anindirectly_readabletype to anindirectly_writabletype (concept)indirectly_copyable_storable(C++20) β specifies that values may be copied from anindirectly_readabletype to anindirectly_writabletype and that the copy may be performed via an intermediate object (concept)
periodt. that's the whole page, no cap π
Source: http://cppreference.com β version 2024.06.10 β page std::indire...le_storable(3). Go drink some water and then go model some concepts, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms