<xtree>: Use scope guard for node copy failure#4749
<xtree>: Use scope guard for node copy failure#4749StephanTLavavej merged 1 commit intomicrosoft:mainfrom
<xtree>: Use scope guard for node copy failure#4749Conversation
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_Newrootsince_Scary->_Myhead->_Isnilis alwaystrue. Closes #1913.