Skip to content

Commit 00829d0

Browse files
committed
New issue from Tim Song: "flat_meow range insertion behavior is unclear if in-place merge cannot allocate additional memory"
1 parent faf69f8 commit 00829d0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

xml/issue4374.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4374" status="New">
5+
<title><tt>flat_<i>meow</i></tt> range insertion behavior is unclear if in-place merge cannot allocate additional memory</title>
6+
<section>
7+
<sref ref="[flat.map.modifiers]"/>
8+
<sref ref="[flat.set.modifiers]"/>
9+
<sref ref="[flat.multiset.modifiers]"/>
10+
</section>
11+
<submitter>Tim Song</submitter>
12+
<date>09 Sep 2025</date>
13+
<priority>99</priority>
14+
15+
<discussion>
16+
<p>
17+
The range insertion operations of `flat_map`/`multimap`/`set`/`multiset` have this <i>Remarks</i>: element:
18+
</p>
19+
<blockquote><p>
20+
Since this operation performs an in-place merge, it may allocate memory.
21+
</p></blockquote>
22+
<p>
23+
It is not clear what happens if that allocation fails. If the `inplace_merge` algorithm is used,
24+
it will fall back to a less efficient <tt>&#x1d4aa;(N log N)</tt> algorithm, but this is not reflected
25+
in the <i>Complexity</i>: element. Alternatively, if the allocation failure is reported by an exception,
26+
that should be called out in the spec.
27+
</p>
28+
</discussion>
29+
30+
<resolution>
31+
</resolution>
32+
33+
</issue>

0 commit comments

Comments
 (0)