summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-03-18 22:56:50 +0000
committerEric Fiselier <eric@efcs.ca>2015-03-18 22:56:50 +0000
commit6d370568c3239568f9ba375f521ea84315abace7 (patch)
tree373f4b4c1911f7d6587e75f354ee729e13c0a685 /libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
parentcf1d7df2e30f3b2469308ca37b65e73e4be352e7 (diff)
downloadbcm5719-llvm-6d370568c3239568f9ba375f521ea84315abace7.tar.gz
bcm5719-llvm-6d370568c3239568f9ba375f521ea84315abace7.zip
[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
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp')
-rw-r--r--libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp6
1 files changed, 4 insertions, 2 deletions
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 <functional>
#include <cassert>
-#include "test_allocator.h"
+#include "min_allocator.h"
int main()
{
- std::function<int(int)> f(std::allocator_arg, test_allocator<int>());
+ {
+ std::function<int(int)> f(std::allocator_arg, bare_allocator<int>());
assert(!f);
+ }
}
OpenPOWER on IntegriCloud