[libcxx-commits] [libcxx] [libc++][C++03] Introduce LIBCPP_{, NON_}FROZEN_ASSERT (PR #163380)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 15 08:53:58 PDT 2025


================
@@ -270,7 +268,8 @@ void test_alloc(const Alloc& lhs_alloc                   = Alloc(),
       V rhs_arr[] = {V(10, 4), V(13, 5), V(12, 324), V(0, 54), V(50, 5), V(2, 5)};
       Map copy(begin(rhs_arr), end(rhs_arr), 0, std::hash<int>(), std::equal_to<int>(), rhs_alloc);
       copy = orig;
-      LIBCPP_ASSERT(copy.bucket_count() == 5);
+      LIBCPP_FROZEN_ASSERT(copy.bucket_count() == 11);
----------------
ldionne wrote:

I would rather:
- Introduce `LIBCPP_ASSERT_NOT_FROZEN_CXX03`
- Drop the assertion in the frozen case
- Eventually, this will be renamed to `LIBCPP_ASSERT_NOT_CXX03` when the notion of "frozen" becomes just the status quo.

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


More information about the libcxx-commits mailing list