[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2017-02-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jonathan Wakely  ---
Fixed for 5.5 and 6.4

[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2017-02-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Tue Feb 14 21:17:11 2017
New Revision: 245454

URL: https://gcc.gnu.org/viewcvs?rev=245454=gcc=rev
Log:
PR78273 fix count to work with partitioning function

Backport from mainline
2017-01-11  Jonathan Wakely  

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-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/bits/stl_map.h
branches/gcc-5-branch/libstdc++-v3/include/bits/stl_set.h
   
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/map/operations/2.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/set/operations/2.cc

[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2017-02-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Tue Feb 14 20:07:26 2017
New Revision: 245446

URL: https://gcc.gnu.org/viewcvs?rev=245446=gcc=rev
Log:
PR78273 fix count to work with partitioning function

Backport from mainline
2017-01-11  Jonathan Wakely  

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

[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2017-01-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |5.5
  Known to fail||5.4.0, 6.3.0

--- Comment #3 from Jonathan Wakely  ---
Fixed on trunk so far.

[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2017-01-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Wed Jan 11 14:44:04 2017
New Revision: 244317

URL: https://gcc.gnu.org/viewcvs?rev=244317=gcc=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

[Bug libstdc++/78273] The transparent version of {map,set}::count should call _M_count_tr

2016-11-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-09
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Oh, good point.