P0458R2 Checking for Existence of an Element in Associative Containers

Programming / Compilers / GCC - redi [138bc75d-0d04-0410-961f-82ee72b054a4] - 4 July 2018 18:16 EDT

- include/bits/stl_map.h (map::contains): Add for C++2a.
- include/bits/stl_multimap.h (multimap::contains): Likewise.
- include/bits/stl_multiset.h (multiset::contains): Likewise.
- include/bits/stl_set.h (set::contains): Likewise.
- include/bits/stl_tree.h (__has_is_transparent_t): Define alias. (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr) (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr) (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
- include/bits/unordered_map.h (unordered_map::contains) (unordered_multimap::contains): Add for C++2a.
- include/bits/unordered_set.h (unordered_set::contains) (unordered_multiset::contains): Likewise.
- testsuite/23_containers/map/operations/contains.cc: New.
- testsuite/23_containers/multimap/operations/contains.cc: New.
- testsuite/23_containers/multiset/operations/contains.cc: New.
- testsuite/23_containers/set/operations/contains.cc: New.
- testsuite/23_containers/unordered_map/operations/contains.cc: New.
- testsuite/23_containers/unordered_multimap/operations/contains.cc: New.
- testsuite/23_containers/unordered_multiset/operations/contains.cc: New.
- testsuite/23_containers/unordered_set/operations/contains.cc: New.

be7ce806062 P0458R2 Checking for Existence of an Element in Associative Containers
libstdc++-v3/ChangeLog | 26 ++++++++
libstdc++-v3/include/bits/stl_map.h | 19 ++++++
libstdc++-v3/include/bits/stl_multimap.h | 19 ++++++
libstdc++-v3/include/bits/stl_multiset.h | 19 ++++++
libstdc++-v3/include/bits/stl_set.h | 19 ++++++
libstdc++-v3/include/bits/stl_tree.h | 35 +++++------
libstdc++-v3/include/bits/unordered_map.h | 22 +++++++
libstdc++-v3/include/bits/unordered_set.h | 22 +++++++
.../23_containers/map/operations/contains.cc | 65 ++++++++++++++++++++
.../23_containers/multimap/operations/contains.cc | 71 ++++++++++++++++++++++
.../23_containers/multiset/operations/contains.cc | 71 ++++++++++++++++++++++
.../23_containers/set/operations/contains.cc | 65 ++++++++++++++++++++
.../unordered_map/operations/contains.cc | 42 +++++++++++++
.../unordered_multimap/operations/contains.cc | 45 ++++++++++++++
.../unordered_multiset/operations/contains.cc | 45 ++++++++++++++
.../unordered_set/operations/contains.cc | 42 +++++++++++++
16 files changed, 607 insertions(+), 20 deletions(-)

Upstream: gcc.gnu.org


  • Share