[PATCH] Adjust tr1::_Hashtable to work with std::allocator in C++20

Jonathan Wakely jwakely@redhat.com
Fri Oct 4 13:18:00 GMT 2019


In C++20 std::allocator will no longer define construct and destroy
member functions, so using them needs to go via allocator_traits.
    
        * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
        __gnu_cxx::__alloc_traits for allocator construct function.
        (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.

I forgot to include the necessary header, so there was another patch
to fix that:

        * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.

Tested x86_64-linux, committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2465 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191004/55f608d0/attachment.bin>


More information about the Gcc-patches mailing list