-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrss.xml
More file actions
169 lines (145 loc) · 7.7 KB
/
Copy pathrss.xml
File metadata and controls
169 lines (145 loc) · 7.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>cpprefjp - C++日本語リファレンス</title>
<link href="https://cpprefjp.github.io" />
<updated>2026-07-30T11:09:16.390952</updated>
<id>73aa474e-6c1a-4360-a6ba-97e01360b2dd</id>
<entry>
<title>shuffle -- fixed sample implementation</title>
<link href="https://cpprefjp.github.io/reference/algorithm/shuffle.html"/>
<id>19699b798e6ce50b0a04a65c04ceb7aa67c4efd6:reference/algorithm/shuffle.md</id>
<updated>2026-07-30T20:04:07+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/algorithm/shuffle.md b/reference/algorithm/shuffle.md
index 3a4dcac90..70a4ff8f7 100644
--- a/reference/algorithm/shuffle.md
+++ b/reference/algorithm/shuffle.md
@@ -112,7 +112,7 @@ void shuffle(RandomAccessIterator first, RandomAccessIterator last, UniformRando
using distance_type = typename iterator_traits&lt;RandomAccessIterator&gt;::difference_type;
using unsigned_type = typename make_unsigned&lt;distance_type&gt;::type;
- using distribute_type = typename uniform_int_distribution&lt;unsigned_type&gt;;
+ using distribute_type = uniform_int_distribution&lt;unsigned_type&gt;;
using param_type = typename distribute_type::param_type;
distribute_type d;
</code></pre></summary>
<author>
<name>rotarymars</name>
<email>s.goto2050@gmail.com</email>
</author>
</entry>
<entry>
<title>get -- fixed missing constexpr</title>
<link href="https://cpprefjp.github.io/reference/array/array/get.html"/>
<id>c21a0d9bcc2fc4d37e3650026888bee2536d025c:reference/array/array/get.md</id>
<updated>2026-07-30T20:00:22+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/array/array/get.md b/reference/array/array/get.md
index f95ed6908..dac6c3671 100644
--- a/reference/array/array/get.md
+++ b/reference/array/array/get.md
@@ -16,7 +16,7 @@ namespace std {
T&amp;&amp; get(array&lt;T, N&gt;&amp;&amp; x) noexcept; // (2) C++11
template &lt;std::size_t I, class T, std::size_t N&gt;
- T&amp;&amp; get(array&lt;T, N&gt;&amp;&amp; x) noexcept; // (2) C++14
+ constexpr T&amp;&amp; get(array&lt;T, N&gt;&amp;&amp; x) noexcept; // (2) C++14
template &lt;std::size_t I, class T, std::size_t N&gt;
const T&amp; get(const array&lt;T, N&gt;&amp; x) noexcept; // (3) C++11
</code></pre></summary>
<author>
<name>rotarymars</name>
<email>s.goto2050@gmail.com</email>
</author>
</entry>
<entry>
<title>mismatch -- fix of sample implementation</title>
<link href="https://cpprefjp.github.io/reference/algorithm/ranges_mismatch.html"/>
<id>fef2ce3f811477f5a5d345f6aa931dca9672364d:reference/algorithm/ranges_mismatch.md</id>
<updated>2026-07-30T19:58:45+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/algorithm/ranges_mismatch.md b/reference/algorithm/ranges_mismatch.md
index 0d062d1d1..22a30458f 100644
--- a/reference/algorithm/ranges_mismatch.md
+++ b/reference/algorithm/ranges_mismatch.md
@@ -196,7 +196,7 @@ struct mismatch_impl {
template&lt;input_iterator I1, sentinel_for&lt;I1&gt; S1, input_iterator I2, sentinel_for&lt;I2&gt; S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity&gt;
requires indirectly_comparable&lt;I1, I2, Pred, Proj1, Proj2&gt;
constexpr mismatch_result&lt;I1, I2&gt; operator()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) const {
- for ( ; first1 != last1 &amp;&amp; first != last2; ++first1, ++first2)
+ for ( ; first1 != last1 &amp;&amp; first2 != last2; ++first1, ++first2)
if (!bool(invoke(pred, invoke(proj1, *first1), invoke(proj2, *first2))))
return {first1, first2};
return {first1, first2};
</code></pre></summary>
<author>
<name>rotarymars</name>
<email>s.goto2050@gmail.com</email>
</author>
</entry>
<entry>
<title>replace_copy_if -- fix sample implementation</title>
<link href="https://cpprefjp.github.io/reference/algorithm/replace_copy_if.html"/>
<id>59e80b4a1dc92fac692bd5b9b7814cc25df2ad0c:reference/algorithm/replace_copy_if.md</id>
<updated>2026-07-30T19:53:35+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/algorithm/replace_copy_if.md b/reference/algorithm/replace_copy_if.md
index 21bbeadea..e2d043103 100644
--- a/reference/algorithm/replace_copy_if.md
+++ b/reference/algorithm/replace_copy_if.md
@@ -172,7 +172,7 @@ template &lt;class InputIterator, class OutputIterator, class Predicate, class T&gt;
OutputIterator replace_copy_if(InputIterator first, InputIterator last, OutputIterator result,
Predicate pred, const T&amp; new_value) {
for ( ; first != last; ++first)
- *result++ = pred(*first, old_value) ? new_value : *first;
+ *result++ = pred(*first) ? new_value : *first;
return result;
}
```
</code></pre></summary>
<author>
<name>rotarymars</name>
<email>s.goto2050@gmail.com</email>
</author>
</entry>
<entry>
<title>search_n -- fix sample implementation</title>
<link href="https://cpprefjp.github.io/reference/algorithm/ranges_search_n.html"/>
<id>71f7d680d926b09663df4d9bf3d10e44c8316c82:reference/algorithm/ranges_search_n.md</id>
<updated>2026-07-30T19:51:01+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/algorithm/ranges_search_n.md b/reference/algorithm/ranges_search_n.md
index 4442818c7..da45a0392 100644
--- a/reference/algorithm/ranges_search_n.md
+++ b/reference/algorithm/ranges_search_n.md
@@ -167,7 +167,7 @@ struct search_n_impl {
requires indirectly_comparable&lt;I, const T*, Pred, Proj&gt;
constexpr subrange&lt;I&gt; operator()(I first, S last, iter_difference_t&lt;I&gt; count, const T&amp; value, Pred pred = {}, Proj proj = {}) const {
if (first == last || count &lt;= 0)
- return first;
+ return {first, first};
while (first != last) {
if (*first == value) {
@@ -177,20 +177,21 @@ struct search_n_impl {
for (; i &lt; count &amp;&amp; it != last &amp;&amp; invoke(pred, invoke(proj, *it), value); ++i, ++it)
;
if (i == count)
- return {first, i};
+ return {first, it};
else if (it == last)
- return {last, last};
+ return {it, it};
else
first = it;
}
++first;
}
+ return {first, first};
}
template&lt;forward_range R, class T, class Pred = ranges::equal_to, class Proj = identity&gt;
requires indirectly_comparable&lt;iterator_t&lt;R&gt;, const T*, Pred, Proj&gt;
constexpr borrowed_subrange_t&lt;R&gt; operator()(R&amp;&amp; r, range_difference_t&lt;R&gt; count, const T&amp; value, Pred pred = {}, Proj proj = {}) const {
- return (*this)(begin(r1), end(r1), count, value, ref(pred), ref(proj));
+ return (*this)(begin(r), end(r), count, value, ref(pred), ref(proj));
}
};
</code></pre></summary>
<author>
<name>rotarymars</name>
<email>s.goto2050@gmail.com</email>
</author>
</entry>
</feed>