summaryrefslogtreecommitdiffstats
path: root/test/std/utilities/function.objects
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-01-25 17:29:55 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-01-25 17:29:55 +0000
commit73de880a446f1056e547e9b0c12722d746b48076 (patch)
tree5a5f228ebb591da4821587f034a8be23d2ae517f /test/std/utilities/function.objects
parent005e38f9fb52079d97f648850371d0128aa6f789 (diff)
downloadexternal_libcxx-73de880a446f1056e547e9b0c12722d746b48076.tar.gz
external_libcxx-73de880a446f1056e547e9b0c12722d746b48076.tar.bz2
external_libcxx-73de880a446f1056e547e9b0c12722d746b48076.zip
Implement LWG#2385; remove the allocator-aware std::function::assign call. It was useless, and didn't actually *do anything* with the allocator. Now it's gone. On the off chance that someone is mistakenly calling it, it's only gone in C++1z
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/utilities/function.objects')
-rw-r--r--test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
index e9ecfa553..cb45b30a9 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
@@ -12,10 +12,12 @@
// class function<R(ArgTypes...)>
// template<class F, class A> void assign(F&&, const A&);
+// This call was removed post-C++14
#include <functional>
#include <cassert>
+#include "test_macros.h"
#include "test_allocator.h"
class A
@@ -49,6 +51,7 @@ int A::count = 0;
int main()
{
+#if TEST_STD_VER <= 14
{
std::function<int(int)> f;
f.assign(A(), test_allocator<A>());
@@ -57,4 +60,5 @@ int main()
assert(f.target<int(*)(int)>() == 0);
}
assert(A::count == 0);
+#endif
}