<vector>: More scope guards by frederick-vs-ja · Pull Request #4977 · microsoft/STL (original) (raw)

frederick-vs-ja

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

@frederick-vs-ja

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

@StephanTLavavej

@StephanTLavavej

StephanTLavavej

StephanTLavavej

@StephanTLavavej

Thanks, this is a very clean transformation! 🪄 I pushed a conflict-free merge with main and reordered one guard member.

@StephanTLavavej

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej

Thanks again for improving the STL's bestest data structure! 💯 ⭐ 💚