diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:58 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:58 +0000 |
| commit | 53a420fba21cf1644972b34dcd811a43cdb8368d (patch) | |
| tree | 66a19f6f8b65215772549a51d688492ab8addc0d /include/exception | |
| parent | b50f1549701eb950921e5d6f2e55ba1a1dadbb43 (diff) | |
Notes
Diffstat (limited to 'include/exception')
| -rw-r--r-- | include/exception | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/include/exception b/include/exception index 186d379f08f5..98e1f37f919e 100644 --- a/include/exception +++ b/include/exception @@ -79,11 +79,8 @@ template <class E> void rethrow_if_nested(const E& e); #include <__config> #include <cstddef> -#include <type_traits> -#if defined(_LIBCPP_NO_EXCEPTIONS) -#include <cstdio> #include <cstdlib> -#endif +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -165,7 +162,10 @@ make_exception_ptr(_Ep __e) _NOEXCEPT { return current_exception(); } -#endif // _LIBCPP_NO_EXCEPTIONS +#else + ((void)__e); + _VSTD::abort(); +#endif } // nested_exception @@ -209,6 +209,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t)); +#else + ((void)__t); + // FIXME: Make this abort. #endif } @@ -229,6 +232,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw _VSTD::forward<_Tp>(__t); +#else + ((void)__t); + // FIXME: Make this abort #endif } @@ -255,19 +261,4 @@ rethrow_if_nested(const _Ep&, typename enable_if< } // std -_LIBCPP_BEGIN_NAMESPACE_STD - -template <class _Exception> -_LIBCPP_INLINE_VISIBILITY -inline void __libcpp_throw(_Exception const& __e) { -#ifndef _LIBCPP_NO_EXCEPTIONS - throw __e; -#else - _VSTD::fprintf(stderr, "%s\n", __e.what()); - _VSTD::abort(); -#endif -} - -_LIBCPP_END_NAMESPACE_STD - #endif // _LIBCPP_EXCEPTION |
