The
indirectly_copyable concept specifies the relationship between
a
indirectly_readable type and a
indirectly_writable type
between which values may be copied
.
template<class In, class Out>
concept indirectly_copyable =
indirectly_readable<In> &&
indirectly_writable<Out, iter_reference_t<In>>;
The
indirectly_copyable_storable concept augments
indirectly_copyable with additional requirements enabling
the transfer to be performed through an intermediate object of the
indirectly_readable type's value type
. It also requires the capability
to make copies of values
.
template<class In, class Out>
concept indirectly_copyable_storable =
indirectly_copyable<In, Out> &&
indirectly_writable<Out, iter_value_t<In>&> &&
indirectly_writable<Out, const iter_value_t<In>&> &&
indirectly_writable<Out, iter_value_t<In>&&> &&
indirectly_writable<Out, const iter_value_t<In>&&> &&
copyable<iter_value_t<In>> &&
constructible_from<iter_value_t<In>, iter_reference_t<In>> &&
assignable_from<iter_value_t<In>&, iter_reference_t<In>>;
Let
i be a dereferenceable value of type
In. In and
Out model
indirectly_copyable_storable<In, Out>
only if after the initialization of the object
obj in
iter_value_t<In> obj(*i);
obj is equal to the value previously denoted by
*i. If
iter_reference_t<In> is an rvalue reference type, the resulting state
of the value denoted by
*i is
valid but unspecified (
[lib.types.movedfrom])
.