Init
This commit is contained in:
56
cppdraft/alg/all/of.md
Normal file
56
cppdraft/alg/all/of.md
Normal file
@@ -0,0 +1,56 @@
|
||||
[alg.all.of]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.6 Non-modifying sequence operations [[alg.nonmodifying]](alg.nonmodifying#alg.all.of)
|
||||
|
||||
### 26.6.1 All of [alg.all.of]
|
||||
|
||||
[ð](#lib:all_of)
|
||||
|
||||
`template<class InputIterator, class Predicate>
|
||||
constexpr bool all_of(InputIterator first, InputIterator last, Predicate pred);
|
||||
template<class ExecutionPolicy, class ForwardIterator, class Predicate>
|
||||
bool all_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
|
||||
Predicate pred);
|
||||
|
||||
template<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_iterator [iterator.concept.input]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_for [iterator.concept.sentinel]")<I> S, class Proj = identity,
|
||||
[indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<projected<I, Proj>> Pred>
|
||||
constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {});
|
||||
template<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") R, class Proj = identity,
|
||||
[indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<projected<iterator_t<R>, Proj>> Pred>
|
||||
constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {});
|
||||
|
||||
template<[execution-policy](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_access_iterator [iterator.concept.random.access]") I, [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_sentinel_for [iterator.concept.sizedsentinel]")<I> S,
|
||||
class Proj = identity, [indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<projected<I, Proj>> Pred>
|
||||
bool ranges::all_of(Ep&& exec, I first, S last, Pred pred, Proj proj = {});
|
||||
template<[execution-policy](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [sized-random-access-range](range.refinements#concept:sized-random-access-range "25.4.6 Other range refinements [range.refinements]") R, class Proj = identity,
|
||||
[indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<projected<iterator_t<R>, Proj>> Pred>
|
||||
bool ranges::all_of(Ep&& exec, R&& r, Pred pred, Proj proj = {});
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L4408)
|
||||
|
||||
Let E be:
|
||||
|
||||
- [(1.1)](#1.1)
|
||||
|
||||
pred(*i) for the overloads in namespace std;
|
||||
|
||||
- [(1.2)](#1.2)
|
||||
|
||||
invoke(pred, invoke(proj, *i)) for the overloads in namespace ranges[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L4418)
|
||||
|
||||
*Returns*: false if E is false for some iterator i in the range [first, last), andtrue otherwise[.](#2.sentence-1)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L4424)
|
||||
|
||||
*Complexity*: At most last - first applications of the predicate and any projection[.](#3.sentence-1)
|
||||
Reference in New Issue
Block a user