summaryrefslogtreecommitdiffstats
path: root/libcxx/include/future
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-08-08 18:38:55 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-08-08 18:38:55 +0000
commit8c9742051d8a12df72798deeaa0475431b10dd3e (patch)
tree56a731825392e8cdb383c4b388a5360248128a75 /libcxx/include/future
parent9ba6eaec575e8f3317cd2194198906709c6d9e1a (diff)
downloadbcm5719-llvm-8c9742051d8a12df72798deeaa0475431b10dd3e.tar.gz
bcm5719-llvm-8c9742051d8a12df72798deeaa0475431b10dd3e.zip
My previous reorganization of addressof broke -std=c++03. Thanks much to Arnold Schwaighofer for catching this. This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.
llvm-svn: 187997
Diffstat (limited to 'libcxx/include/future')
-rw-r--r--libcxx/include/future6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/future b/libcxx/include/future
index dae1a4b805e..00c99bc0906 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -727,7 +727,7 @@ __assoc_state<_Rp&>::set_value(_Rp& __arg)
if (this->__has_value())
throw future_error(make_error_code(future_errc::promise_already_satisfied));
#endif
- __value_ = &__arg;
+ __value_ = _VSTD::addressof(__arg);
this->__state_ |= base::__constructed | base::ready;
__lk.unlock();
__cv_.notify_all();
@@ -742,7 +742,7 @@ __assoc_state<_Rp&>::set_value_at_thread_exit(_Rp& __arg)
if (this->__has_value())
throw future_error(make_error_code(future_errc::promise_already_satisfied));
#endif
- __value_ = &__arg;
+ __value_ = _VSTD::addressof(__arg);
this->__state_ |= base::__constructed;
__thread_local_data()->__make_ready_at_thread_exit(this);
__lk.unlock();
@@ -778,7 +778,7 @@ void
__assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
{
if (this->__state_ & base::__constructed)
- reinterpret_cast<_Rp*>(&this->__value_)->~_Rp();
+ reinterpret_cast<_Rp*>(_VSTD::addressof(this->__value_))->~_Rp();
typename _Alloc::template rebind<__assoc_state_alloc>::other __a(__alloc_);
this->~__assoc_state_alloc();
__a.deallocate(this, 1);
OpenPOWER on IntegriCloud