[libcxx-commits] [libcxx] [libc++] Fix incorrect size check when growing std::string (PR #232737)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 21 22:47:58 PDT 2026


Himadhith wrote:

> > using a custom allocator that uses a 32-bit `size_type`
> 
> libc++'s `basic_string` has `std::min` and `std::max` calls that fail to compile when used with a custom allocator where a value of the `size_type` is subject to integer promotions. If that were not the case, a smaller `size_type` could be used.

Heres' a PR addressing the issue with a fix: https://github.com/llvm/llvm-project/pull/234500. 
CC: @ldionne @philnik777 

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


More information about the libcxx-commits mailing list