[Bug libstdc++/61107] stl_algo.h: std::__inplace_stable_partition() doesn't process the whole data range

François Dumont frs.dumont@gmail.com
Fri Oct 17 20:46:00 GMT 2014


Hi

     As proposed in the bug report I just removed the 
__inplace_stable_partition as __stable_partition_adaptive is able to 
handle a 0 buffer size.

     To test this bug I introduced overloads of new/delete operators in 
the testsuite utils. The existing set_memory_limits has no impact on new 
operator. I wonder if some test using it really have the expected behavior.

     I also tests other algos that try to use a buffer and didn't found 
any issue. Those algos however can't be simplified like stable_partition.

2014-10-16  François Dumont <fdumont@gcc.gnu.org>

     PR libstdc++/61107
     * include/bits/stl_algo.h (__inplace_stable_partition): Delete.
     (__stable_partition): Adapt.
     * testsuite/util/testsuite_new_operators.h: New.
     * testsuite/25_algorithms/stable_sort/1.cc: Test algo in simulated
     constraint memory context.
     * testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
     * testsuite/25_algorithms/stable_partition/1.cc: Likewise.

Tested under Linux x86_64.

Ok to commit ?

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: algo.patch
Type: text/x-patch
Size: 10769 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141017/847ccfe7/attachment.bin>


More information about the Libstdc++ mailing list