summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/src/future.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/src/future.cpp')
-rw-r--r--contrib/libc++/src/future.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/libc++/src/future.cpp b/contrib/libc++/src/future.cpp
index 3132b18..e1758f3 100644
--- a/contrib/libc++/src/future.cpp
+++ b/contrib/libc++/src/future.cpp
@@ -221,10 +221,12 @@ promise<void>::~promise()
{
if (__state_)
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (!__state_->__has_value() && __state_->use_count() > 1)
__state_->set_exception(make_exception_ptr(
future_error(make_error_code(future_errc::broken_promise))
));
+#endif // _LIBCPP_NO_EXCEPTIONS
__state_->__release_shared();
}
}
OpenPOWER on IntegriCloud