[libcxx-commits] [libcxx] [libc++] Add exception guard for vector<bool>::__init_with_sentinel (PR #115491)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 26 12:58:09 PST 2024
================
@@ -0,0 +1,87 @@
+//===----------------------------------------------------------------------===//
----------------
winner245 wrote:
Thank you for your suggestion. Yes, these classes, e.g., `throwing_allocator`, `throwing_iterator` were originally only used by the primary template `std::vector<T, Alloc>` before I added new tests for the `vector<bool>` specialization. During this PR, I noticed that we didn't have exception tests for `vector<bool>`, so I added these tests for the ctors of `vector<bool>`. Then I realized that the extracted classes such as `throwing_allocator`, `throwing_iterator` are now used by both the primary `std::vector<T, Alloc>` and the specialization `vector<bool>`.
I agree with your that these classes do not belong to `support/` which targets more general purposes. Your suggestion `libcxx/test/std/containers/sequences/vector/common.h` sounds good to me.
https://github.com/llvm/llvm-project/pull/115491
More information about the libcxx-commits
mailing list