[PATCH] D15862: A possible direction for fixing https://llvm.org/bugs/show_bug.cgi?id=25973.

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 07:10:01 PST 2016

mclow.lists marked 2 inline comments as done.

Comment at: include/string:2677-2678
@@ +2676,4 @@
+        for (; __first != __last; ++__first)
+            push_back(*__first);
tcanens wrote:
> If an exception is thrown after a `push_back()` causes reallocation, existing iterators/pointers/references would have been invalidated, and the `catch` block can't do anything about it.
> It looks like a temporary string is also needed here.
Dang, you're right. Thanks.


More information about the cfe-commits mailing list