Fix bugs in std::string#2305
Conversation
* Missing capacity for null terminator * Leaking memor in case of unequal allocators * Not swapping the proxy during swap * swapping data in case of self swap
mnatsuhara
left a comment
There was a problem hiding this comment.
Reviewed all changes and they look good! I'm really happy with the additional test coverage -- thanks for going through and adding all of that :) Just one question regarding test coverage for EDG.
Also change the MSVC internal testing guard to EDG. (As an aside, that internal macro was recently underscore-prefixed.)
|
I've pushed the following changes:
Thanks for fixing all these bugs, especially the one where swap didn't think it needed to swap proxies for the small-small case. I was sure that change wasn't necessary, until I attempted to revert it and discovered a test failure, and then I was sure the test was bogus, until I looked further and saw that the test was quite strict about the behavior of equality. Nicely done! |
Verified that all of Casey's comments have been addressed.
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks 🐞 for 🐜 fixing 🐛 these 🪲 bugs! 🐝 |
This pulls out the bugfixes for std::string from #1735
I did keep the
_Is_element_ptrchanges, please bear with me here