https://llvm.org/bugs/show_bug.cgi?id=31779
Bug ID: 31779 Summary: basic_string::operator= isn't exception safe Product: libc++ Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: llvm-b...@daryl.haresign.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified Assigning one string to another, where they have non-equal propagate-on-copy-assignment allocators, does a `clear()`, followed by an `assign()`. The `assign()` may throw, which leaves the string in a cleared state. This seems to violate the requirement specified here: http://eel.is/c++draft/basic.string#string.require-2 A contrived example to show this: http://coliru.stacked-crooked.com/a/c43a723d04878890 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs