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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to frankhb1989 from comment #0)
> Case:
> 
> #include <utility>
> #include <memory_resource>
> #include <map>
> #include <functional>
> 
> struct A : std::allocator<std::pair<const int, int>>
> {
>       template<typename U>
>       struct rebind
>       {
>               using other = std::pmr::polymorphic_allocator<U>;

This type does not meet the allocator requirements. For a valid allocator,
A::rebind<A::value_type>::other must be the same type as A, and
A::rebind<U>::other::rebind<A::value_type>::other must also be the same type as
A.

Reply via email to