Files
cppdraft_translate/cppdraft/alg/req/general.md
2025-10-25 03:02:53 +03:00

39 lines
2.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[alg.req.general]
# 24 Iterators library [[iterators]](./#iterators)
## 24.3 Iterator requirements [[iterator.requirements]](iterator.requirements#alg.req.general)
### 24.3.7 Common algorithm requirements [[alg.req]](alg.req#general)
#### 24.3.7.1 General [alg.req.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2545)
There are several additional iterator concepts that are commonly applied
to families of algorithms[.](#1.sentence-1)
These group together iterator requirements
of algorithm families[.](#1.sentence-2)
There are three relational concepts that specify
how element values are transferred between[indirectly_readable](iterator.concept.readable#concept:indirectly_readable "24.3.4.2Concept indirectly_­readable[iterator.concept.readable]") and [indirectly_writable](iterator.concept.writable#concept:indirectly_writable "24.3.4.3Concept indirectly_­writable[iterator.concept.writable]") types:[indirectly_movable](alg.req.ind.move#concept:indirectly_movable "24.3.7.2Concept indirectly_­movable[alg.req.ind.move]"),[indirectly_copyable](alg.req.ind.copy#concept:indirectly_copyable "24.3.7.3Concept indirectly_­copyable[alg.req.ind.copy]"), and[indirectly_swappable](alg.req.ind.swap#concept:indirectly_swappable "24.3.7.4Concept indirectly_­swappable[alg.req.ind.swap]")[.](#1.sentence-3)
There are three relational concepts for rearrangements:[permutable](alg.req.permutable#concept:permutable "24.3.7.6Concept permutable[alg.req.permutable]"),[mergeable](alg.req.mergeable#concept:mergeable "24.3.7.7Concept mergeable[alg.req.mergeable]"), and[sortable](alg.req.sortable#concept:sortable "24.3.7.8Concept sortable[alg.req.sortable]")[.](#1.sentence-4)
There is one relational concept for comparing values from different sequences:[indirectly_comparable](alg.req.ind.cmp#concept:indirectly_comparable "24.3.7.5Concept indirectly_­comparable[alg.req.ind.cmp]")[.](#1.sentence-5)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L2562)
[*Note [1](#note-1)*:
The ranges::less function object type
used in the concepts below imposes constraints on the concepts' arguments
in addition to those that appear in the concepts' bodies ([[range.cmp]](range.cmp "22.10.9Concept-constrained comparisons"))[.](#2.sentence-1)
— *end note*]