tmp/tmpv6rbfn4q/{from.md → to.md}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
### Move iterators <a id="move.iterators">[[move.iterators]]</a>
|
| 2 |
|
| 3 |
Class template `move_iterator` is an iterator adaptor with the same
|
| 4 |
-
behavior as the underlying iterator except that its
|
| 5 |
implicitly converts the value returned by the underlying iterator’s
|
| 6 |
-
|
| 7 |
be called with move iterators to replace copying with moving.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
list<string> s;
|
| 11 |
// populate the list s
|
|
@@ -77,11 +77,11 @@ namespace std {
|
|
| 77 |
const move_iterator<Iterator2>& y) -> decltype(x.base() - y.base());
|
| 78 |
template <class Iterator>
|
| 79 |
move_iterator<Iterator> operator+(
|
| 80 |
typename move_iterator<Iterator>::difference_type n, const move_iterator<Iterator>& x);
|
| 81 |
template <class Iterator>
|
| 82 |
-
move_iterator<Iterator> make_move_iterator(
|
| 83 |
}
|
| 84 |
```
|
| 85 |
|
| 86 |
#### `move_iterator` requirements <a id="move.iter.requirements">[[move.iter.requirements]]</a>
|
| 87 |
|
|
@@ -306,10 +306,10 @@ template <class Iterator>
|
|
| 306 |
|
| 307 |
*Returns:* `x + n`.
|
| 308 |
|
| 309 |
``` cpp
|
| 310 |
template <class Iterator>
|
| 311 |
-
move_iterator<Iterator> make_move_iterator(
|
| 312 |
```
|
| 313 |
|
| 314 |
*Returns:* `move_iterator<Iterator>(i)`.
|
| 315 |
|
|
|
|
| 1 |
### Move iterators <a id="move.iterators">[[move.iterators]]</a>
|
| 2 |
|
| 3 |
Class template `move_iterator` is an iterator adaptor with the same
|
| 4 |
+
behavior as the underlying iterator except that its indirection operator
|
| 5 |
implicitly converts the value returned by the underlying iterator’s
|
| 6 |
+
indirection operator to an rvalue reference. Some generic algorithms can
|
| 7 |
be called with move iterators to replace copying with moving.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
list<string> s;
|
| 11 |
// populate the list s
|
|
|
|
| 77 |
const move_iterator<Iterator2>& y) -> decltype(x.base() - y.base());
|
| 78 |
template <class Iterator>
|
| 79 |
move_iterator<Iterator> operator+(
|
| 80 |
typename move_iterator<Iterator>::difference_type n, const move_iterator<Iterator>& x);
|
| 81 |
template <class Iterator>
|
| 82 |
+
move_iterator<Iterator> make_move_iterator(Iterator i);
|
| 83 |
}
|
| 84 |
```
|
| 85 |
|
| 86 |
#### `move_iterator` requirements <a id="move.iter.requirements">[[move.iter.requirements]]</a>
|
| 87 |
|
|
|
|
| 306 |
|
| 307 |
*Returns:* `x + n`.
|
| 308 |
|
| 309 |
``` cpp
|
| 310 |
template <class Iterator>
|
| 311 |
+
move_iterator<Iterator> make_move_iterator(Iterator i);
|
| 312 |
```
|
| 313 |
|
| 314 |
*Returns:* `move_iterator<Iterator>(i)`.
|
| 315 |
|