aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-01-19 23:07:52 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-01-19 23:07:52 +0000
commit437f43cc78d4607e72d7873b64342de2ce2d75cc (patch)
treee2fdd14f91b9a394be11153c1426b2348fc1f013 /gcc
parentd445d739b91c2e68c2b13c265910ecf24511f3a3 (diff)
downloadgcc-437f43cc78d4607e72d7873b64342de2ce2d75cc.zip
gcc-437f43cc78d4607e72d7873b64342de2ce2d75cc.tar.gz
gcc-437f43cc78d4607e72d7873b64342de2ce2d75cc.tar.bz2
PR67085 pass comparison functions by reference in heap algorithms
PR libstdc++/67085 * include/bits/predefined_ops.h (_Iter_less_val, _Val_less_iter): Add converting constructors from _Iter_less_iter. (_Iter_comp_val, _Val_comp_iter): Add converting constructors from _Iter_comp_iter. (__iter_comp_val(_Iter_comp_iter<C>): Use converting constructor. (__val_comp_iter(_Iter_comp_iter<C>): Likewise. * include/bits/stl_heap.h (__is_heap_until, __push_heap, __pop_heap) (__make_heap, __sort_heap): Change _Compare parameters to references. (__is_heap, push_heap, __adjust_heap, __pop_heap, pop_heap) (__make_heap, make_heap, sort_heap, is_heap_until): Pass comparison functions as lvalues. (is_heap): Call __is_heap_until directly to avoid copying __comp. * testsuite/23_containers/priority_queue/67085.cc: Adjust test to count copies during construction with empty sequence. From-SVN: r244656
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions