summaryrefslogtreecommitdiffstats
path: root/libcxx/include/exception
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r--libcxx/include/exception4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception
index 2d8c0f541d7..ef2b969b742 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -193,7 +193,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
-#if _LIBCPP_STD_VER > 11
+#if _LIBCPP_STD_VER > 11 && __has_feature(is_final)
&& !is_final<typename remove_reference<_Tp>::type>::value
#endif
>::type* = 0)
@@ -215,7 +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
-#if _LIBCPP_STD_VER > 11
+#if _LIBCPP_STD_VER > 11 && __has_feature(is_final)
|| is_final<typename remove_reference<_Tp>::type>::value
#endif
>::type* = 0)
OpenPOWER on IntegriCloud