This is an archive of the discontinued LLVM Phabricator instance.

Allow std::vector to move construct its allocator
AbandonedPublic

Authored by fidget324 on Jun 5 2018, 3:32 PM.

Details

Reviewers
hiraditya
EricWF
Summary

Fix an issue that was preventing std::vector from invoking the move
constructor on its allocator when appropriate.

Added a constructor to __vector_base which accepts an rvalue reference
to the allocator, thus allowing the move constructor to be invoked.
Previously, only a const lvalue reference was being accepted.

This fixes bug 37694: https://bugs.llvm.org/show_bug.cgi?id=37694.

Diff Detail

Event Timeline

fidget324 created this revision.Jun 5 2018, 3:32 PM
EricWF added a comment.Jun 5 2018, 6:37 PM

@fidget324 Thanks for the patch! Unfortunatly I didn't know you were planning on contributing a fix, so I went ahead and fixed it myself in r334053.

fidget324 abandoned this revision.Jun 5 2018, 10:24 PM

That's fine. Your patch was much more thorough, anyways.