41 lines
3.7 KiB
Markdown
41 lines
3.7 KiB
Markdown
[alg.req.ind.move]
|
||
|
||
# 24 Iterators library [[iterators]](./#iterators)
|
||
|
||
## 24.3 Iterator requirements [[iterator.requirements]](iterator.requirements#alg.req.ind.move)
|
||
|
||
### 24.3.7 Common algorithm requirements [[alg.req]](alg.req#ind.move)
|
||
|
||
#### 24.3.7.2 Concept indirectly_movable [alg.req.ind.move]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2571)
|
||
|
||
The [indirectly_movable](#concept:indirectly_movable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]") concept specifies the relationship between
|
||
an [indirectly_readable](iterator.concept.readable#concept:indirectly_readable "24.3.4.2 Concept indirectly_readable [iterator.concept.readable]") type and an [indirectly_writable](iterator.concept.writable#concept:indirectly_writable "24.3.4.3 Concept indirectly_writable [iterator.concept.writable]") type
|
||
between which values may be moved[.](#1.sentence-1)
|
||
|
||
template<class In, class Out>concept [indirectly_movable](#concept:indirectly_movable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]") =[indirectly_readable](iterator.concept.readable#concept:indirectly_readable "24.3.4.2 Concept indirectly_readable [iterator.concept.readable]")<In> &&[indirectly_writable](iterator.concept.writable#concept:indirectly_writable "24.3.4.3 Concept indirectly_writable [iterator.concept.writable]")<Out, iter_rvalue_reference_t<In>>;
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2583)
|
||
|
||
The [indirectly_movable_storable](#concept:indirectly_movable_storable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]") concept augments[indirectly_movable](#concept:indirectly_movable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]") with additional requirements enabling
|
||
the transfer to be performed through an intermediate object of the[indirectly_readable](iterator.concept.readable#concept:indirectly_readable "24.3.4.2 Concept indirectly_readable [iterator.concept.readable]") type's value type[.](#2.sentence-1)
|
||
|
||
template<class In, class Out>concept [indirectly_movable_storable](#concept:indirectly_movable_storable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]") =[indirectly_movable](#concept:indirectly_movable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]")<In, Out> &&[indirectly_writable](iterator.concept.writable#concept:indirectly_writable "24.3.4.3 Concept indirectly_writable [iterator.concept.writable]")<Out, iter_value_t<In>> &&[movable](concepts.object#concept:movable "18.6 Object concepts [concepts.object]")<iter_value_t<In>> &&[constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<In>, iter_rvalue_reference_t<In>> &&[assignable_from](concept.assignable#concept:assignable_from "18.4.8 Concept assignable_from [concept.assignable]")<iter_value_t<In>&, iter_rvalue_reference_t<In>>;
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2599)
|
||
|
||
Let i be a dereferenceable value of type In[.](#3.sentence-1)
|
||
|
||
In and Out model [indirectly_movable_storable](#concept:indirectly_movable_storable "24.3.7.2 Concept indirectly_movable [alg.req.ind.move]")<In, Out> only if after the initialization of the object obj initer_value_t<In> obj(ranges::iter_move(i));obj is equal to the value previously denoted by *i[.](#3.sentence-2)
|
||
|
||
Ifiter_rvalue_reference_t<In> is an rvalue reference type,
|
||
the resulting state of the value denoted by *i is
|
||
valid but unspecified ([[lib.types.movedfrom]](lib.types.movedfrom "16.4.6.17 Moved-from state of library types"))[.](#3.sentence-3)
|