[libcxx-commits] [libcxx] [libc++] Add exception guard for vector<bool>::__init_with_sentinel (PR #115491)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 26 12:29:01 PST 2024


================
@@ -0,0 +1,87 @@
+//===----------------------------------------------------------------------===//
----------------
ldionne wrote:

We have several helper classes in the test suite that attempt to provide reusable functionality like these ones. In practice, this often doesn't work really well because these classes are closely tied to the way they're used.

I spent some time trying to think about ways to make the classes below more "general purpose" so that it would make sense to actually reuse them in other tests (besides the ones for `std::vector<T>`) and I couldn't come up with something good. As it stands, I think it's unlikely that e.g. `throwing_allocator` would really be reused much outside of the `std::vector` classes (let me know if you disagree).

If you agree with the above, then I think it would be better to avoid putting these classes inside `support/` to avoid giving the impression that they are general purpose. Instead, we can put them in e.g. `libcxx/test/std/containers/sequences/vector/common.h`.

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


More information about the libcxx-commits mailing list