Mark LWG issue 2276 as complete. Add _LIBCPP_ASSERTS for it
llvm-svn: 271247
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 5362bbb02a4c5e31b7efce541336853ddfbcbf0c
diff --git a/include/future b/include/future
index 957a23c..3bbb925 100644
--- a/include/future
+++ b/include/future
@@ -1514,6 +1514,7 @@
void
promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
{
+ _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
if (__state_ == nullptr)
__throw_future_error(future_errc::no_state);
__state_->set_exception_at_thread_exit(__p);
@@ -1649,6 +1650,7 @@
void
promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
{
+ _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
if (__state_ == nullptr)
__throw_future_error(future_errc::no_state);
__state_->set_exception_at_thread_exit(__p);