From Jason Turner

[alg.starts.with]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp35d4x06a/{from.md → to.md} +22 -0
tmp/tmp35d4x06a/{from.md → to.md} RENAMED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Starts with <a id="alg.starts.with">[[alg.starts.with]]</a>
2
+
3
+ ``` cpp
4
+ template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
5
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
6
+ requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
7
+ constexpr bool ranges::starts_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
8
+ Proj1 proj1 = {}, Proj2 proj2 = {});
9
+ template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,
10
+ class Proj2 = identity>
11
+ requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
12
+ constexpr bool ranges::starts_with(R1&& r1, R2&& r2, Pred pred = {},
13
+ Proj1 proj1 = {}, Proj2 proj2 = {});
14
+ ```
15
+
16
+ *Returns:*
17
+
18
+ ``` cpp
19
+ ranges::mismatch(std::move(first1), last1, std::move(first2), last2,
20
+ pred, proj1, proj2).in2 == last2
21
+ ```
22
+