[libcxx-commits] [libcxx] [libc++] Improve test coverage for copy/move ctors for vector<bool> (PR #120132)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 19 09:06:16 PDT 2025
================
@@ -9,54 +9,70 @@
// UNSUPPORTED: c++03
// <vector>
+// vector<bool>
// vector(vector&& c);
-#include <vector>
+#include <array>
#include <cassert>
-#include "test_macros.h"
-#include "test_allocator.h"
+#include <vector>
+
#include "min_allocator.h"
+#include "test_allocator.h"
+#include "test_macros.h"
+
+template <unsigned N, class A>
+TEST_CONSTEXPR_CXX20 void test(const A& a) {
+ std::vector<bool, A> v(N, false, a);
+ std::vector<bool, A> v0(N, false, a);
----------------
ldionne wrote:
```suggestion
std::vector<bool, A> copy(N, false, a);
```
I think the test would be more readable like that. Or `std::vector<bool, A> original`.
https://github.com/llvm/llvm-project/pull/120132
More information about the libcxx-commits
mailing list