This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jan 2017 14:44:37 +0000
- Subject: [Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr
- Auto-submitted: auto-generated
- References: <bug-78273-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Jan 11 14:44:04 2017
New Revision: 244317
URL: https://gcc.gnu.org/viewcvs?rev=244317&root=gcc&view=rev
Log:
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.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_map.h
trunk/libstdc++-v3/include/bits/stl_set.h
trunk/libstdc++-v3/testsuite/23_containers/map/operations/2.cc
trunk/libstdc++-v3/testsuite/23_containers/set/operations/2.cc