[libcxx-commits] [libcxx] [libc++][C++03] cherry-pick #119801 (PR #158247)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 12 01:49:57 PDT 2025


https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/158247

None

>From 7690539e10437a4b375e1ac85a72f09ace231921 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 12 Sep 2025 10:49:33 +0200
Subject: [PATCH] [libc++][C++03] cherry-pick #119801

---
 libcxx/include/__cxx03/vector                                   | 2 +-
 .../sequences/vector.bool/small_allocator_size.pass.cpp         | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/libcxx/include/__cxx03/vector b/libcxx/include/__cxx03/vector
index 8192ffc1a0dae..4b62e0bf33c46 100644
--- a/libcxx/include/__cxx03/vector
+++ b/libcxx/include/__cxx03/vector
@@ -1891,7 +1891,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const {
   const size_type __cap = capacity();
   if (__cap >= __ms / 2)
     return __ms;
-  return std::max(2 * __cap, __align_it(__new_size));
+  return std::max<size_type>(2 * __cap, __align_it(__new_size));
 }
 
 //  Default constructs __n objects starting at __end_
diff --git a/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp
index 0136fb0631604..7017351d47865 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp
@@ -9,8 +9,6 @@
 // <vector>
 // vector<bool>
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // This test ensures that std::vector<bool> handles allocator types with small size types
 // properly. Related issue: https://llvm.org/PR121713.
 



More information about the libcxx-commits mailing list