Skip to content

Commit b93bfba

Browse files
committed
New issue from Jiang An: "What should happen when an exception is thrown on resizing std::deque, std::forward_list, or std::list?"
1 parent 259b012 commit b93bfba

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

xml/issue4225.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4225" status="New">
5+
<title>What should happen when an exception is thrown on resizing `std::deque`, `std::forward_list`, or `std::list`?</title>
6+
<section>
7+
<sref ref="[deque.capacity]"/><sref ref="[forward.list.modifiers]"/><sref ref="[list.capacity]"/>
8+
</section>
9+
<submitter>Jiang An</submitter>
10+
<date>15 Mar 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
Currently, `std::vector` and `std::inplace_vector`'s `resize` functions are specified to have no effects
16+
on the container when an exception is throwing on appending. However, such specification seem to be missing
17+
for `std::deque`, `std::forward_list`, and `std::list`.
18+
<p/>
19+
Is such difference intented? Do we want to roll back the status of container when the appending is partially done?
20+
<p/>
21+
<b>Daniel:</b>
22+
<p/>
23+
The specific `resize` exception guarantee for `std::vector` came from resolving LWG <iref ref="2033"/> and were
24+
later effectively copied to `std::inplace_vector` because that container's specification should resemble
25+
as much as possible that of `std::vector`.
26+
</p>
27+
</discussion>
28+
29+
<resolution>
30+
</resolution>
31+
32+
</issue>

0 commit comments

Comments
 (0)