Skip to content

Commit ac94ae1

Browse files
committed
New issue from Hewill: "The helper lambda of std::erase for hive should specify return type as bool"
1 parent 72a45d4 commit ac94ae1

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

xml/issue4233.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4233" status="New">
5+
<title>The helper lambda of <code>std::erase</code> for <code>hive</code> should specify return type as
6+
<code>bool</code></title>
7+
<section>
8+
<sref ref="[hive.erasure]"/>
9+
</section>
10+
<submitter>Hewill Kang</submitter>
11+
<date>24 Mar 2025</date>
12+
<priority>99</priority>
13+
14+
<discussion>
15+
<p>
16+
This is a follow up to LWG <iref ref="4135"/>, which incidentally adds a default template
17+
parameter for <code>U</code> to be consistent with other <code>erase</code> functions,
18+
which is editorial since the declaration already has it.
19+
</p>
20+
</discussion>
21+
22+
<resolution>
23+
<p>
24+
This wording is relative to <paper num="N5008"/>.
25+
</p>
26+
27+
<ol>
28+
29+
<li><p>Modify <sref ref="[hive.erasure]"/> as indicated:</p>
30+
31+
<blockquote>
32+
<pre>
33+
template&lt;class T, class Allocator, class U <ins>= T</ins>&gt;
34+
typename hive&lt;T, Allocator&gt;::size_type
35+
erase(hive&lt;T, Allocator&gt;&amp; c, const U&amp; value);
36+
</pre>
37+
<blockquote>
38+
<p>
39+
-1- <i>Effects</i>: Equivalent to:
40+
</p>
41+
<blockquote><pre>
42+
return erase_if(c, [&amp;](<ins>const</ins> auto&amp; elem) <ins>-&gt; bool</ins> { return elem == value; });
43+
</pre></blockquote>
44+
</blockquote>
45+
</blockquote>
46+
</li>
47+
48+
</ol>
49+
</resolution>
50+
51+
</issue>

0 commit comments

Comments
 (0)