]> git.ipfire.org Git - thirdparty/gcc.git/commit
Adjust extension types to use allocator_traits
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2019 16:14:28 +0000 (16:14 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2019 16:14:28 +0000 (16:14 +0000)
commit5cde879d749de561f271911f08255c79aaf803ec
treeeecdf7326f959268b1d3a3dc997d14369a6b8f5a
parent0ae47ae29fe100e46df6bcde2c3e2299c20184a2
Adjust extension types to use allocator_traits

This makes these extensions work with types meeting the Cpp17Allocator
requirements as well as the C++98 Allocator requirements.

* include/backward/hash_set (hash_set): Use __alloc_traits.
* include/backward/hashtable.h (_Hashtable): Likewise.
* include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
taking a hint.
* include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
hint.
* include/ext/slist (_Slist_base): Use __alloc_traits.
* include/tr1/hashtable.h (_Hashtable): Likewise.
* include/tr1/regex (match_results): Use vector::const_reference
instead of assuming the allocator defines it.
* testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
* testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
__gnu_test::max_size.
* testsuite/tr1/6_containers/unordered_multimap/capacity/
29134-multimap.cc: Likewise.
* testsuite/tr1/6_containers/unordered_multiset/capacity/
29134-multiset.cc: Likewise.
* testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277335 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/backward/hash_set
libstdc++-v3/include/backward/hashtable.h
libstdc++-v3/include/ext/alloc_traits.h
libstdc++-v3/include/ext/extptr_allocator.h
libstdc++-v3/include/ext/slist
libstdc++-v3/include/tr1/hashtable.h
libstdc++-v3/include/tr1/regex
libstdc++-v3/testsuite/backward/hash_map/23528.cc
libstdc++-v3/testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc
libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
libstdc++-v3/testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc