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