File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 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< class T, class Allocator, class U <ins >= T</ins >>
34+ typename hive< T, Allocator> ::size_type
35+ erase(hive< T, Allocator>& c, const U& value);
36+ </pre >
37+ <blockquote >
38+ <p >
39+ -1- <i >Effects</i >: Equivalent to:
40+ </p >
41+ <blockquote ><pre >
42+ return erase_if(c, [& ](<ins >const</ins > auto& elem) <ins >-> bool</ins > { return elem == value; });
43+ </pre ></blockquote >
44+ </blockquote >
45+ </blockquote >
46+ </li >
47+
48+ </ol >
49+ </resolution >
50+
51+ </issue >
You can’t perform that action at this time.
0 commit comments