re PR libstdc++/49559 ([C++0x] stable_sort calls self-move-assignment operator)
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 11 Jul 2011 18:38:54 +0000 (18:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 11 Jul 2011 18:38:54 +0000 (18:38 +0000)
commit848ca96f30746fc6972105de156656ce8c5ee586
treeaf254038a743c9a107aed7a037726e84595e5ec9
parentf9610d205a723ac0d4cb4076dbd2d935b0077373
re PR libstdc++/49559 ([C++0x] stable_sort calls self-move-assignment operator)

2011-07-11  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/49559
* include/bits/stl_algo.h (__move_merge_backward): Remove.
(__move_merge_adaptive, __move_merge_adaptive_backward): New.
(__merge_adaptive): Use the latter two.
(__rotate_adaptive): Avoid self move-assignment.
* include/bits/stl_algobase.h (move_backward): Fix comment.
* testsuite/25_algorithms/stable_sort/49559.cc: New.
* testsuite/25_algorithms/inplace_merge/49559.cc: Likewise.
* testsuite/25_algorithms/inplace_merge/moveable.cc: Extend.
* testsuite/25_algorithms/inplace_merge/moveable2.cc: Likewise.
* testsuite/util/testsuite_rvalref.h (rvalstruct::operator=
(rvalstruct&&)): Check for self move-assignment.

From-SVN: r176174
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/testsuite/25_algorithms/inplace_merge/49559.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
libstdc++-v3/testsuite/25_algorithms/stable_sort/49559.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_rvalref.h