From 6d370568c3239568f9ba375f521ea84315abace7 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 18 Mar 2015 22:56:50 +0000 Subject: [libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind. 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`. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8391 llvm-svn: 232686 --- .../func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp') diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp index 4feac30c300..f97e34d3f2c 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp @@ -16,10 +16,12 @@ #include #include -#include "test_allocator.h" +#include "min_allocator.h" int main() { - std::function f(std::allocator_arg, test_allocator()); + { + std::function f(std::allocator_arg, bare_allocator()); assert(!f); + } } -- cgit v1.2.3