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
This commit is contained in:
Marshall Clow
2016-01-25 17:29:55 +00:00
parent 005e38f9fb
commit 73de880a44
3 changed files with 11 additions and 4 deletions

View File

@@ -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
}