Add a couple of _LIBCPP_ASSERT calls. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1482,6 +1482,7 @@ template <class _Rp>
|
|||||||
void
|
void
|
||||||
promise<_Rp>::set_exception(exception_ptr __p)
|
promise<_Rp>::set_exception(exception_ptr __p)
|
||||||
{
|
{
|
||||||
|
_LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
|
||||||
if (__state_ == nullptr)
|
if (__state_ == nullptr)
|
||||||
__throw_future_error(future_errc::no_state);
|
__throw_future_error(future_errc::no_state);
|
||||||
__state_->set_exception(__p);
|
__state_->set_exception(__p);
|
||||||
@@ -1629,6 +1630,7 @@ template <class _Rp>
|
|||||||
void
|
void
|
||||||
promise<_Rp&>::set_exception(exception_ptr __p)
|
promise<_Rp&>::set_exception(exception_ptr __p)
|
||||||
{
|
{
|
||||||
|
_LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
|
||||||
if (__state_ == nullptr)
|
if (__state_ == nullptr)
|
||||||
__throw_future_error(future_errc::no_state);
|
__throw_future_error(future_errc::no_state);
|
||||||
__state_->set_exception(__p);
|
__state_->set_exception(__p);
|
||||||
|
|||||||
Reference in New Issue
Block a user