Skip to content

Commit 6c42375

Browse files
committed
Add comment about implementation to 4164 P/R
1 parent c597e58 commit 6c42375

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xml/issue4164.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ A "no effects" guarantee is already given for `push_front` and `emplace_front`
5353
in <sref ref="[container.reqmts]"/> p66, although that doesn't say anything
5454
about iterator invalidation so we might want to add that to
5555
<sref ref="[forward.list.modifiers]"/> too.
56+
For the functions that insert a single element, it's trivial to not modify
57+
the list if allocating a new node of constructing the element throws.
58+
The strong exception safety guarantee for the multi-element insertion functions
59+
is easily achieved by inserting into a temporary `forward_list` first,
60+
then using `splice_after` which is non-throwing.
5661
</p>
5762

5863
</discussion>

0 commit comments

Comments
 (0)