[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 14 20:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Feb 14 20:07:26 2017
New Revision: 245446
URL: https://gcc.gnu.org/viewcvs?rev=245446&root=gcc&view=rev
Log:
PR78273 fix count to work with partitioning function
Backport from mainline
2017-01-11 Jonathan Wakely <jwakely@redhat.com>
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.
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_map.h
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_set.h
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/map/operations/2.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/set/operations/2.cc
More information about the Gcc-bugs
mailing list