Skip to content

Conversation

philnik777
Copy link
Contributor

No description provided.

@philnik777 philnik777 requested a review from a team as a code owner September 12, 2025 08:49
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 12, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/158247.diff

2 Files Affected:

  • (modified) libcxx/include/__cxx03/vector (+1-1)
  • (modified) libcxx/test/std/containers/sequences/vector.bool/small_allocator_size.pass.cpp (-2)
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.
 

@philnik777 philnik777 merged commit 2a0d7f8 into llvm:main Sep 24, 2025
77 of 80 checks passed
@philnik777 philnik777 deleted the cxx03_cherry_pick_vector_bool branch September 24, 2025 08:56
TejaX-Alaghari pushed a commit to TejaX-Alaghari/llvm-project that referenced this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants