aboutsummaryrefslogtreecommitdiff
path: root/system/include/libcxx/exception
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libcxx/exception')
-rw-r--r--system/include/libcxx/exception36
1 files changed, 19 insertions, 17 deletions
diff --git a/system/include/libcxx/exception b/system/include/libcxx/exception
index f418575c..51a48c82 100644
--- a/system/include/libcxx/exception
+++ b/system/include/libcxx/exception
@@ -80,7 +80,9 @@ template <class E> void rethrow_if_nested(const E& e);
#include <cstddef>
#include <type_traits>
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
+#endif
namespace std // purposefully not using versioning namespace
{
@@ -105,19 +107,19 @@ public:
typedef void (*unexpected_handler)();
_LIBCPP_VISIBLE unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
_LIBCPP_VISIBLE unexpected_handler get_unexpected() _NOEXCEPT;
-_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void unexpected();
+_LIBCPP_NORETURN _LIBCPP_VISIBLE void unexpected();
typedef void (*terminate_handler)();
_LIBCPP_VISIBLE terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
_LIBCPP_VISIBLE terminate_handler get_terminate() _NOEXCEPT;
-_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void terminate() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_VISIBLE void terminate() _NOEXCEPT;
_LIBCPP_VISIBLE bool uncaught_exception() _NOEXCEPT;
-class exception_ptr;
+class _LIBCPP_VISIBLE exception_ptr;
exception_ptr current_exception() _NOEXCEPT;
-_ATTRIBUTE(noreturn) void rethrow_exception(exception_ptr);
+_LIBCPP_NORETURN void rethrow_exception(exception_ptr);
class _LIBCPP_VISIBLE exception_ptr
{
@@ -130,7 +132,7 @@ public:
~exception_ptr() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
- // explicit
+ _LIBCPP_EXPLICIT
operator bool() const _NOEXCEPT {return __ptr_ != nullptr;}
friend _LIBCPP_INLINE_VISIBILITY
@@ -141,12 +143,12 @@ public:
{return !(__x == __y);}
friend exception_ptr current_exception() _NOEXCEPT;
- _ATTRIBUTE(noreturn) friend void rethrow_exception(exception_ptr);
+ friend void rethrow_exception(exception_ptr);
};
-template<class _E>
+template<class _Ep>
exception_ptr
-make_exception_ptr(_E __e) _NOEXCEPT
+make_exception_ptr(_Ep __e) _NOEXCEPT
{
#ifndef _LIBCPP_NO_EXCEPTIONS
try
@@ -172,7 +174,7 @@ public:
virtual ~nested_exception() _NOEXCEPT;
// access functions
- _ATTRIBUTE(noreturn) void rethrow_nested() const;
+ _LIBCPP_NORETURN void rethrow_nested() const;
_LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;}
};
@@ -185,7 +187,7 @@ struct __nested
};
template <class _Tp>
-_ATTRIBUTE(noreturn)
+_LIBCPP_NORETURN
void
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested(_Tp&& __t, typename enable_if<
@@ -204,7 +206,7 @@ throw_with_nested (_Tp& __t, typename enable_if<
}
template <class _Tp>
-_ATTRIBUTE(noreturn)
+_LIBCPP_NORETURN
void
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested(_Tp&& __t, typename enable_if<
@@ -222,11 +224,11 @@ throw_with_nested (_Tp& __t, typename enable_if<
#endif
}
-template <class _E>
+template <class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
void
-rethrow_if_nested(const _E& __e, typename enable_if<
- is_polymorphic<_E>::value
+rethrow_if_nested(const _Ep& __e, typename enable_if<
+ is_polymorphic<_Ep>::value
>::type* = 0)
{
const nested_exception* __nep = dynamic_cast<const nested_exception*>(&__e);
@@ -234,11 +236,11 @@ rethrow_if_nested(const _E& __e, typename enable_if<
__nep->rethrow_nested();
}
-template <class _E>
+template <class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
void
-rethrow_if_nested(const _E& __e, typename enable_if<
- !is_polymorphic<_E>::value
+rethrow_if_nested(const _Ep&, typename enable_if<
+ !is_polymorphic<_Ep>::value
>::type* = 0)
{
}