[libcxx-commits] [libcxx] [libc++] Simplify vector<bool>::flip() and add new tests (PR #119607)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 14 04:10:57 PST 2024


================
@@ -0,0 +1,100 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <vector>
+
+// void flip();
+
+#include <cassert>
+#include <vector>
+
+#include "min_allocator.h"
+#include "test_allocator.h"
+#include "test_macros.h"
+
+TEST_CONSTEXPR_CXX20 bool tests() {
----------------
philnik777 wrote:

I'd instead template this on the allocator to avoid a bunch of duplicate code.

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


More information about the libcxx-commits mailing list