[libcxx-commits] [libcxx] [libc++][test] Fix and refactor exception tests for std::vector constructors (PR #117662)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 28 08:44:32 PST 2024


winner245 wrote:

> Thanks a lot for the analysis! What I would find amazingly useful would be to first augment the tests for vector to ensure that all the exception safety behavior is tested properly, and we can then proceed to gradually refactor vector's implementation to either make it faster (for example via some relocation work like [this WIP branch of mine](https://github.com/llvm/llvm-project/compare/main...ldionne:llvm-project:wip/wg21-trivial-relocation-discussion-base)) or to change the exception safety guarantee that we provide in libc++ (your PR), depending on what we decide to do. Augmenting the tests first has the benefit that we'll gain confidence that our follow-up changes are either not functionally-changing, or they are but exactly in the ways that we expect.

> Would you like to do that?

Thank you for your feedback! I completely agree that augmenting the tests for vector to ensure thorough exception safety coverage is a crucial first step. This will indeed provide us with the confidence needed for any subsequent changes, whether they aim to improve performance or enhance exception safety guarantees.

I would be happy to proceed with augmenting the tests as suggested. I look forward to collaborating on this!

https://github.com/llvm/llvm-project/pull/117662


More information about the libcxx-commits mailing list