https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125890

            Bug ID: 125890
           Summary: allocator_traits<polymorphic_allocator> doesn't
                    provide allocate_at_least in 16.1
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

#include <memory>
#include <memory_resource>

#ifndef __cpp_lib_allocate_at_least
#error unexpected
#endif 

void f() {
    std::pmr::polymorphic_allocator<> a;
   
std::allocator_traits<std::pmr::polymorphic_allocator<>>::allocate_at_least(a,
10);
}

with -std=c++23 (or 26):

<source>: In function 'void f()':
<source>:10:63: error: 'allocate_at_least' is not a member of
'std::allocator_traits<std::pmr::polymorphic_allocator<> >'
   10 |    
std::allocator_traits<std::pmr::polymorphic_allocator<>>::allocate_at_least(a,
10);
      |                                                              
^~~~~~~~~~~~~~~~~

This has been fixed on trunk as part of
r17-603-gacfdad706d8acca6c4ed6ef3b63c2e02f1c47881. 

Can the fix be backported to 16.2?

Reply via email to