aboutsummaryrefslogtreecommitdiff
path: root/include/future
diff options
context:
space:
mode:
Diffstat (limited to 'include/future')
-rw-r--r--include/future28
1 files changed, 12 insertions, 16 deletions
diff --git a/include/future b/include/future
index 6fe6f8da5049..5b5afe6e2771 100644
--- a/include/future
+++ b/include/future
@@ -329,7 +329,7 @@ public:
template <class F>
explicit packaged_task(F&& f);
template <class F, class Allocator>
- explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f);
+ packaged_task(allocator_arg_t, const Allocator& a, F&& f);
~packaged_task();
// no copy
@@ -651,7 +651,6 @@ __assoc_state<_Rp>::set_value(_Arg& __arg)
#endif
::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
this->__state_ |= base::__constructed | base::ready;
- __lk.unlock();
__cv_.notify_all();
}
@@ -672,7 +671,6 @@ __assoc_state<_Rp>::set_value_at_thread_exit(_Arg& __arg)
::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
this->__state_ |= base::__constructed;
__thread_local_data()->__make_ready_at_thread_exit(this);
- __lk.unlock();
}
template <class _Rp>
@@ -733,7 +731,6 @@ __assoc_state<_Rp&>::set_value(_Rp& __arg)
#endif
__value_ = _VSTD::addressof(__arg);
this->__state_ |= base::__constructed | base::ready;
- __lk.unlock();
__cv_.notify_all();
}
@@ -749,7 +746,6 @@ __assoc_state<_Rp&>::set_value_at_thread_exit(_Rp& __arg)
__value_ = _VSTD::addressof(__arg);
this->__state_ |= base::__constructed;
__thread_local_data()->__make_ready_at_thread_exit(this);
- __lk.unlock();
}
template <class _Rp>
@@ -783,10 +779,10 @@ __assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
{
if (this->__state_ & base::__constructed)
reinterpret_cast<_Rp*>(_VSTD::addressof(this->__value_))->~_Rp();
- typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _A;
- typedef allocator_traits<_A> _ATraits;
+ typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _Al;
+ typedef allocator_traits<_Al> _ATraits;
typedef pointer_traits<typename _ATraits::pointer> _PTraits;
- _A __a(__alloc_);
+ _Al __a(__alloc_);
this->~__assoc_state_alloc();
__a.deallocate(_PTraits::pointer_to(*this), 1);
}
@@ -809,10 +805,10 @@ template <class _Rp, class _Alloc>
void
__assoc_state_alloc<_Rp&, _Alloc>::__on_zero_shared() _NOEXCEPT
{
- typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _A;
- typedef allocator_traits<_A> _ATraits;
+ typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _Al;
+ typedef allocator_traits<_Al> _ATraits;
typedef pointer_traits<typename _ATraits::pointer> _PTraits;
- _A __a(__alloc_);
+ _Al __a(__alloc_);
this->~__assoc_state_alloc();
__a.deallocate(_PTraits::pointer_to(*this), 1);
}
@@ -835,10 +831,10 @@ template <class _Alloc>
void
__assoc_sub_state_alloc<_Alloc>::__on_zero_shared() _NOEXCEPT
{
- typedef typename __allocator_traits_rebind<_Alloc, __assoc_sub_state_alloc>::type _A;
- typedef allocator_traits<_A> _ATraits;
+ typedef typename __allocator_traits_rebind<_Alloc, __assoc_sub_state_alloc>::type _Al;
+ typedef allocator_traits<_Al> _ATraits;
typedef pointer_traits<typename _ATraits::pointer> _PTraits;
- _A __a(__alloc_);
+ _Al __a(__alloc_);
this->~__assoc_sub_state_alloc();
__a.deallocate(_PTraits::pointer_to(*this), 1);
}
@@ -2046,7 +2042,7 @@ public:
>::type
>
_LIBCPP_INLINE_VISIBILITY
- explicit packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
+ packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
__p_(allocator_arg, __a) {}
// ~packaged_task() = default;
@@ -2177,7 +2173,7 @@ public:
>::type
>
_LIBCPP_INLINE_VISIBILITY
- explicit packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
+ packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
__p_(allocator_arg, __a) {}
// ~packaged_task() = default;