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.
Paths
| Differential D8391
[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 Timelinemclow.lists edited edge metadata. Comment ActionsThis 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 Comment Actions Doesn't seem like it. I removed rebind from the test allocators and the only failures I saw were related to this bug.
Revision Contents
Diff 22117 include/functional
test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp
|