This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind.
ClosedPublic

Authored by EricWF on Mar 17 2015, 1:33 PM.

Details

Summary

This patch changes std::function to use allocator_traits to rebind the allocator instead of allocator itself.

It also changes most of the tests to use bare_allocator where possible instead of test_allocator.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 22117.Mar 17 2015, 1:33 PM
EricWF retitled this revision from to [libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: Unknown Object (MLST).
EricWF updated this revision to Diff 22121.Mar 17 2015, 1:47 PM
EricWF updated this object.

No longer use min_allocator. Only bare_allocator.

mclow.lists accepted this revision.Mar 18 2015, 10:11 AM
mclow.lists edited edge metadata.

This looks fine to me. Are there any other places in libc++ where we need to replace allocator rebind with traits rebind?

This revision is now accepted and ready to land.Mar 18 2015, 10:11 AM

Doesn't seem like it. I removed rebind from the test allocators and the only failures I saw were related to this bug.

EricWF closed this revision.Mar 18 2015, 3:59 PM