Add a couple of _LIBCPP_ASSERT calls. No functional change.

llvm-svn: 269663
This commit is contained in:
Marshall Clow 2016-05-16 16:55:32 +00:00
parent abdbbbc51f
commit 0e1c6c7ed1
1 changed files with 2 additions and 0 deletions

View File

@ -1482,6 +1482,7 @@ template <class _Rp>
void
promise<_Rp>::set_exception(exception_ptr __p)
{
_LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
if (__state_ == nullptr)
__throw_future_error(future_errc::no_state);
__state_->set_exception(__p);
@ -1629,6 +1630,7 @@ template <class _Rp>
void
promise<_Rp&>::set_exception(exception_ptr __p)
{
_LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
if (__state_ == nullptr)
__throw_future_error(future_errc::no_state);
__state_->set_exception(__p);