P0458R2 Checking for Existence of an Element in Associative Containers
authorJonathan Wakely <jwakely@redhat.com>
Wed, 4 Jul 2018 18:16:26 +0000 (19:16 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 4 Jul 2018 18:16:26 +0000 (19:16 +0100)
commit3adea09eea448dde8d2c41807845cca6c4f30e89
tree3aa975a42e473815b8d7e5e6dcfe2b83da0003c4
parent96eb9df619ab1ba907c9dc6002f6bbc326e884fb
P0458R2 Checking for Existence of an Element in Associative Containers

* 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.

From-SVN: r262418
16 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_multimap.h
libstdc++-v3/include/bits/stl_multiset.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/unordered_map.h
libstdc++-v3/include/bits/unordered_set.h
libstdc++-v3/testsuite/23_containers/map/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/operations/contains.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/operations/contains.cc [new file with mode: 0644]