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
This commit is contained in:
Howard Hinnant
2010-08-11 17:04:31 +00:00
parent 81e68580b2
commit d444470d6c
20 changed files with 394 additions and 10 deletions

View File

@@ -141,6 +141,7 @@ template<class _E>
exception_ptr
make_exception_ptr(_E __e)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
throw __e;
@@ -149,6 +150,7 @@ make_exception_ptr(_E __e)
{
return current_exception();
}
#endif
}
// nested_exception
@@ -188,7 +190,9 @@ throw_with_nested (_Tp& __t, typename enable_if<
>::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 @@ throw_with_nested (_Tp& __t, typename enable_if<
>::type* = 0)
#endif
{
#ifndef _LIBCPP_NO_EXCEPTIONS
throw _STD::forward<_Tp>(__t);
#endif
}
template <class _E>