-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<xtree>
: Use scope guard for node copy failure
#4749
<xtree>
: Use scope guard for node copy failure
#4749
Conversation
Also removes an `if`-statement since `_Scary->_Myhead->_Isnil` is always `true`.
Is there test coverage? |
I think the partial test coverage is (roughly) in libcxx test's Perhaps we should add a test file to MSVC STL which covers copy/move ctors, corresponding allocator-extended ctors, and copy/move assignment operators of associative containers. |
I expect that non-throwing path is implicitly covered somehow, I think it is enough if there's a test for throwing path |
I mean I'm asking for the coverage for the guard, not for the unneeded conditional removal. |
We didn't have test coverage for the |
#2308 has an example of coverage |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for eliminating yet another occurrence of the try-catch-rethrow pattern! 🐈 🐈⬛ 😸 |
Towards #2307.
Also drops an
if
-statement and reuses_Newroot
since_Scary->_Myhead->_Isnil
is alwaystrue
. Closes #1913.