libstdc++: Add warnings for some C++23 deprecations
authorJonathan Wakely <jwakely@redhat.com>
Wed, 9 Jun 2021 09:11:00 +0000 (10:11 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 9 Jun 2021 09:32:43 +0000 (10:32 +0100)
commit5bfcfe3087eb05b76395c9efbfc1abbf3f9e1a03
tree3b61ba37fe120f659d2a14e4cc48088ffec0c213
parent174e75a210753b68de0f2c398a13ace0f512e35b
libstdc++: Add warnings for some C++23 deprecations

LWG 3036 deprecates std::pmr::polymorphic_allocator<T>::destroy in
favour of the equivalent member of std::allocator_traits.

LWG 3170 deprecates std::allocator<T>::is_always_equal in favour of
the equivalent member of std::allocator_traits.

This also updates a comment to note that we support the LWG 3541 change
(even before the issue was opened).

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/allocator.h (allocator::is_always_equal): Deprecate.
* include/bits/iterator_concepts.h (indirectly_readable_traits):
Add LWG issue number to comment.
* include/std/memory_resource (polymorphic_allocator::release):
Deprecate.
* testsuite/20_util/allocator/requirements/typedefs.cc: Add
dg-warning for deprecation. Also check std::allocator<void>.
libstdc++-v3/include/bits/allocator.h
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/std/memory_resource
libstdc++-v3/testsuite/20_util/allocator/requirements/typedefs.cc