<vector>
: More scope guards by frederick-vs-ja · Pull Request #4977 · microsoft/STL (original) (raw)
Towards #2307. Possibly closes it?
There're still two occurrences of try-catch-reraise in _Insert_counted_range
, which don't seem able to be replaced by scope guards if we want to keep the current behavior. It seems that no more _RERAISE;
in other headers can be replaced with scope guards.
Drive-by: strengthening exception specification for
allocator<T>::deallocate
,allocator_traits<allocator<T>>::deallocate
, andvector<T, A>::_Change_array
.
There're still two occurrences of try-catch-reraise in
_Insert_counted_range
, which don't seem able to be replaced by scope
guards if we want to keep the current behavior. It seems that no more
_RERAISE;
in other headers can be replaced with scope guards.
Drive-by: strengthening exception specification for
allocator<T>::deallocate
,allocator_traits<allocator<T>>::deallocate
, andvector<T, A>::_Change_array
.
Thanks, this is a very clean transformation! 🪄 I pushed a conflict-free merge with main
and reordered one guard member.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.
Thanks again for improving the STL's bestest data structure! 💯 ⭐ 💚