std:: indirectly_copyable_storable
|
定义于头文件
<iterator>
|
||
|
template
<
class
In,
class
Out
>
concept indirectly_copyable_storable
=
|
(C++20 起) | |
indirectly_copyable_storable
概念规定了
indirectly_readable
类型与
indirectly_writable
类型之间的关系。除了
indirectly_copyable
的要求外,此概念还规定从
indirectly_readable
类型执行的拷贝操作可以通过中间对象完成。
语义要求
In
和
Out
模型
std
::
indirectly_copyable_storable
<
In, Out
>
仅当给定类型为
In
的可解引用值
i
时:
-
在定义
std::
iter_value_t
<
In
>
obj
(
*
i
)
;
之后,
obj等于先前由 * i 表示的值,且 -
若
std::
iter_reference_t
<
In
>
为右值引用类型,则在
obj初始化完成后, * i 将处于有效但未指定的状态。
等值保持性
标准库概念的 requires 表达式 中声明的表达式必须满足 等值保持 要求(除非另有说明)。
另请参阅
|
(C++20)
|
规定值可从
indirectly_readable
类型复制到
indirectly_writable
类型
(概念) |
|
(C++20)
|
规定值可从
indirectly_readable
类型移动到
indirectly_writable
类型,且可通过中间对象执行移动操作
(概念) |