[libcxx-commits] [libcxx] [libc++] Fix allocate_at_least test that assumes the size_type of the allocator (PR #131682)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 17 19:47:10 PDT 2025
================
@@ -45,16 +45,18 @@ struct has_allocate_at_least {
constexpr bool test() {
{ // check that std::allocate_at_least forwards to allocator::allocate if no allocate_at_least exists
no_allocate_at_least<int> alloc;
- std::same_as<std::allocation_result<int*>> decltype(auto) ret =
- std::allocator_traits<decltype(alloc)>::allocate_at_least(alloc, 1);
+ using AllocTraits = std::allocator_traits<decltype(alloc)>;
+ std::same_as<std::allocation_result<int*>, AllocTraits::size_type> decltype(auto) ret =
----------------
ldionne wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/131682
More information about the libcxx-commits
mailing list