]> git.ipfire.org Git - thirdparty/gcc.git/commit
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>
Tue, 12 Oct 2021 19:40:37 +0000 (20:40 +0100)
commitbf0c732dd532c6474f7508e98a6989bbfb9299e7
tree666d8389e78de5c7c453cf0880aa3ecde5c29c23
parentf8e37478914884d88c800cf23cf882521f587c04
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>.

(cherry picked from commit 5bfcfe3087eb05b76395c9efbfc1abbf3f9e1a03)
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