summaryrefslogtreecommitdiffstats
path: root/libcxx
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
commit0aa1ccb0d91967ea77f83d210609e632234cc8ef (patch)
tree5ca627eb3708990599c2525d1676aab3b35d7fcc /libcxx
parent24d4eba0f9027f787ae6fdff8d29132e7ed823d9 (diff)
downloadbcm5719-llvm-0aa1ccb0d91967ea77f83d210609e632234cc8ef.tar.gz
bcm5719-llvm-0aa1ccb0d91967ea77f83d210609e632234cc8ef.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
llvm-svn: 258697
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/functional5
-rw-r--r--libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp4
-rw-r--r--libcxx/www/cxx1z_status.html6
3 files changed, 11 insertions, 4 deletions
diff --git a/libcxx/include/functional b/libcxx/include/functional
index dbe9b01bbd8..8f7305b8ec9 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -407,7 +407,7 @@ public:
// function modifiers:
void swap(function&) noexcept;
template<class F, class Alloc>
- void assign(F&&, const Alloc&);
+ void assign(F&&, const Alloc&); // Removed in C++17
// function capacity:
explicit operator bool() const noexcept;
@@ -1626,10 +1626,13 @@ public:
// function modifiers:
void swap(function&) _NOEXCEPT;
+
+#if _LIBCPP_STD_VER <= 14
template<class _Fp, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
void assign(_Fp&& __f, const _Alloc& __a)
{function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
+#endif
// function capacity:
_LIBCPP_INLINE_VISIBILITY
diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
index e9ecfa5539c..cb45b30a9fd 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
+++ b/libcxx/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
}
diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html
index 818c8732750..5b7a4c4c198 100644
--- a/libcxx/www/cxx1z_status.html
+++ b/libcxx/www/cxx1z_status.html
@@ -168,7 +168,7 @@
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2367">2367</a></td><td><tt>pair</tt> and <tt>tuple</tt> are not correctly implemented for <tt>is_constructible</tt> with no args</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2380">2380</a></td><td>May <tt>&lt;cstdlib&gt;</tt> provide <tt>long ::abs(long)</tt> and <tt>long long ::abs(long long)</tt>?</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2384">2384</a></td><td>Allocator's <tt>deallocate</tt> function needs better specification</td><td>Kona</td><td>Complete</td></tr>
- <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2385">2385</a></td><td><tt>function::assign</tt> allocator argument doesn't make sense</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2385">2385</a></td><td><tt>function::assign</tt> allocator argument doesn't make sense</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2435">2435</a></td><td><tt>reference_wrapper::operator()</tt>'s Remark should be deleted</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2447">2447</a></td><td>Allocators and <tt>volatile</tt>-qualified value types</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2462">2462</a></td><td><tt>std::ios_base::failure</tt> is overspecified</td><td>Kona</td><td>Complete</td></tr>
@@ -179,7 +179,7 @@
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2477">2477</a></td><td>Inconsistency of wordings in <tt>std::vector::erase()</tt> and <tt>std::deque::erase()</tt></td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2483">2483</a></td><td><tt>throw_with_nested()</tt> should use <tt>is_final</tt></td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2484">2484</a></td><td><tt>rethrow_if_nested()</tt> is doubly unimplementable</td><td>Kona</td><td>Complete</td></tr>
- <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2485">2485</a></td><td><tt>get()</tt> should be overloaded for <tt>const tuple&amp;&amp;</tt></td><td>Kona</td><td>Completed</td></tr>
+ <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2485">2485</a></td><td><tt>get()</tt> should be overloaded for <tt>const tuple&amp;&amp;</tt></td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2486">2486</a></td><td><tt>mem_fn()</tt> should be required to use perfect forwarding</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2487">2487</a></td><td><tt>bind()</tt> should be <tt>const</tt>-overloaded, not <i>cv</i>-overloaded</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2489">2489</a></td><td><tt>mem_fn()</tt> should be <tt>noexcept</tt></td><td>Kona</td><td>Complete</td></tr>
@@ -192,7 +192,7 @@
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 21-Jan-2016</p>
+ <p>Last Updated: 25-Jan-2016</p>
</div>
</body>
</html>
OpenPOWER on IntegriCloud