PR78273 fix count to work with partitioning function
commit5c67a2718d1735eb0ec1ae931f286e7854c5118f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Jan 2017 14:44:04 +0000 (11 14:44 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Jan 2017 14:44:04 +0000 (11 14:44 +0000)
tree968e331b6db2ff2c777d3680dcf336d9f3ed2dee
parentc1cb3428363ff4e518e787fcd1a908c0da00c6ee
PR78273 fix count to work with partitioning function

PR libstdc++/78273
* include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
the heterogeneous comparison can only find one match.
* include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
* testsuite/23_containers/map/operations/2.cc: Test count works with
comparison function that just partitions rather than sorting.
* testsuite/23_containers/set/operations/2.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244317 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/testsuite/23_containers/map/operations/2.cc
libstdc++-v3/testsuite/23_containers/set/operations/2.cc