now works with -fno-exceptions and -fno-rtti
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/exception b/include/exception
index 51e8313..772ada4 100644
--- a/include/exception
+++ b/include/exception
@@ -141,6 +141,7 @@
exception_ptr
make_exception_ptr(_E __e)
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
throw __e;
@@ -149,6 +150,7 @@
{
return current_exception();
}
+#endif
}
// nested_exception
@@ -188,7 +190,9 @@
>::type* = 0)
#endif
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
+#endif
}
template <class _Tp>
@@ -204,7 +208,9 @@
>::type* = 0)
#endif
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
throw _STD::forward<_Tp>(__t);
+#endif
}
template <class _E>