aboutsummaryrefslogtreecommitdiff
path: root/include/exception
diff options
context:
space:
mode:
Diffstat (limited to 'include/exception')
-rw-r--r--include/exception6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/exception b/include/exception
index cad802e056a5..5a905e7e58d8 100644
--- a/include/exception
+++ b/include/exception
@@ -48,7 +48,8 @@ terminate_handler set_terminate(terminate_handler f ) noexcept;
terminate_handler get_terminate() noexcept;
[[noreturn]] void terminate() noexcept;
-bool uncaught_exception() noexcept;
+bool uncaught_exception() noexcept;
+int uncaught_exceptions() noexcept; // C++17
typedef unspecified exception_ptr;
@@ -115,6 +116,7 @@ _LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
+_LIBCPP_FUNC_VIS int uncaught_exceptions() _NOEXCEPT;
class _LIBCPP_TYPE_VIS exception_ptr;
@@ -193,6 +195,7 @@ void
throw_with_nested(_Tp&& __t, typename enable_if<
is_class<typename remove_reference<_Tp>::type>::value &&
!is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
+ && !__libcpp_is_final<typename remove_reference<_Tp>::type>::value
>::type* = 0)
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested (_Tp& __t, typename enable_if<
@@ -212,6 +215,7 @@ void
throw_with_nested(_Tp&& __t, typename enable_if<
!is_class<typename remove_reference<_Tp>::type>::value ||
is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
+ || __libcpp_is_final<typename remove_reference<_Tp>::type>::value
>::type* = 0)
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested (_Tp& __t, typename enable_if<