diff --git a/include/functional b/include/functional index dbe9b01bb..8f7305b8e 100644 --- a/include/functional +++ b/include/functional @@ -407,7 +407,7 @@ public: // function modifiers: void swap(function&) noexcept; template - 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 _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/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 // template void assign(F&&, const A&); +// This call was removed post-C++14 #include #include +#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 f; f.assign(A(), test_allocator()); @@ -57,4 +60,5 @@ int main() assert(f.target() == 0); } assert(A::count == 0); +#endif } diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html index 818c87327..5b7a4c4c1 100644 --- a/www/cxx1z_status.html +++ b/www/cxx1z_status.html @@ -168,7 +168,7 @@ 2367pair and tuple are not correctly implemented for is_constructible with no argsKonaComplete 2380May <cstdlib> provide long ::abs(long) and long long ::abs(long long)?KonaComplete 2384Allocator's deallocate function needs better specificationKonaComplete - 2385function::assign allocator argument doesn't make senseKona + 2385function::assign allocator argument doesn't make senseKonaComplete 2435reference_wrapper::operator()'s Remark should be deletedKonaComplete 2447Allocators and volatile-qualified value typesKonaComplete 2462std::ios_base::failure is overspecifiedKonaComplete @@ -179,7 +179,7 @@ 2477Inconsistency of wordings in std::vector::erase() and std::deque::erase()KonaComplete 2483throw_with_nested() should use is_finalKonaComplete 2484rethrow_if_nested() is doubly unimplementableKonaComplete - 2485get() should be overloaded for const tuple&&KonaCompleted + 2485get() should be overloaded for const tuple&&KonaComplete 2486mem_fn() should be required to use perfect forwardingKonaComplete 2487bind() should be const-overloaded, not cv-overloadedKonaComplete 2489mem_fn() should be noexceptKonaComplete @@ -192,7 +192,7 @@ -

Last Updated: 21-Jan-2016

+

Last Updated: 25-Jan-2016