This is an archive of the discontinued LLVM Phabricator instance.

Fix a problem in inplace_merge, where we leave objects in a moved-from state.
ClosedPublic

Authored by mclow.lists on Jul 28 2015, 2:30 PM.

Details

Summary

Bug report from Ted K, and solution outlined by Duncan Exon Smith.
Thanks for the info!

Diff Detail

Event Timeline

mclow.lists retitled this revision from to Fix a problem in inplace_merge, where we leave objects in a moved-from state..
mclow.lists updated this object.
mclow.lists added a subscriber: cfe-commits.
EricWF edited edge metadata.Jul 28 2015, 2:43 PM

Adding review comments. LGTM after addressing the comments.

include/algorithm
4365

_LIBCPP_INLINE_VISIBILITY

test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp
23

TEST_STD_VER >= 11 instead?

32

Should we assert that no self move-assignment occurs?

mclow.lists accepted this revision.Jul 29 2015, 9:26 AM
mclow.lists added a reviewer: mclow.lists.
mclow.lists marked an inline comment as done.

Committed as revision 243530

include/algorithm
4365

I don't think so. That's a reasonably large function. Note that __merge is not so decorated.

This revision is now accepted and ready to land.Jul 29 2015, 9:26 AM
mclow.lists closed this revision.Jul 29 2015, 9:26 AM