31 #ifndef _EXCEPTION_PTR_H 32 #define _EXCEPTION_PTR_H 34 #pragma GCC visibility push(default) 39 #if !(defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)) 40 #if ATOMIC_INT_LOCK_FREE < 2 41 # error This platform does not support exception propagation. 55 namespace __exception_ptr
60 using __exception_ptr::exception_ptr;
71 namespace __exception_ptr
81 void* _M_exception_object;
85 void _M_addref() _GLIBCXX_USE_NOEXCEPT;
86 void _M_release() _GLIBCXX_USE_NOEXCEPT;
88 void *_M_get()
const _GLIBCXX_NOEXCEPT __attribute__ ((__pure__));
98 #if __cplusplus >= 201103L 100 : _M_exception_object(0)
104 : _M_exception_object(__o._M_exception_object)
105 { __o._M_exception_object = 0; }
108 #if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT) 118 #if __cplusplus >= 201103L 122 exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*
this);
132 #ifdef _GLIBCXX_EH_PTR_COMPAT 134 void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT
135 __attribute__ ((__const__));
136 bool operator!()
const _GLIBCXX_USE_NOEXCEPT
137 __attribute__ ((__pure__));
138 operator __safe_bool()
const _GLIBCXX_USE_NOEXCEPT;
141 #if __cplusplus >= 201103L 142 explicit operator bool()
const 143 {
return _M_exception_object; }
148 _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
151 __cxa_exception_type()
const _GLIBCXX_USE_NOEXCEPT
152 __attribute__ ((__pure__));
157 _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
161 _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
165 { __lhs.swap(__rhs); }
171 template<
typename _Ex>
193 template<
typename _Ex>
195 copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT _GLIBCXX_DEPRECATED;
197 template<
typename _Ex>
200 {
return std::make_exception_ptr<_Ex>(__ex); }
207 #pragma GCC visibility pop exception_ptr copy_exception(_Ex __ex) noexcept 1
Obtain an exception_ptr pointing to a copy of the supplied object. This function is deprecated...
exception_ptr make_exception_ptr(_Ex __ex) noexcept
Obtain an exception_ptr pointing to a copy of the supplied object.
ISO C++ entities toplevel namespace is std.
void rethrow_exception(exception_ptr) __attribute__((__noreturn__))
Throw the object pointed to by the exception_ptr.
An opaque pointer to an arbitrary exception.
exception_ptr current_exception() noexcept