This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
[move.iterators.general]
# 24 Iterators library [[iterators]](./#iterators)
## 24.5 Iterator adaptors [[predef.iterators]](predef.iterators#move.iterators.general)
### 24.5.4 Move iterators and sentinels [[move.iterators]](move.iterators#general)
#### 24.5.4.1 General [move.iterators.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4760)
Class template move_iterator is an iterator adaptor
with the same behavior as the underlying iterator except that its
indirection operator implicitly converts the value returned by the
underlying iterator's indirection operator to an rvalue[.](#1.sentence-1)
Some generic algorithms can be called with move iterators to replace
copying with moving[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4768)
[*Example [1](#example-1)*: list<string> s;// populate the list s vector<string> v1(s.begin(), s.end()); // copies strings into v1 vector<string> v2(make_move_iterator(s.begin()),
make_move_iterator(s.end())); // moves strings into v2 — *end example*]