31 #ifndef _EXCEPTION_PTR_H
32 #define _EXCEPTION_PTR_H
34 #pragma GCC visibility push(default)
36 #include <bits/c++config.h>
39 #if ATOMIC_INT_LOCK_FREE < 2
40 # error This platform does not support exception propagation.
53 namespace __exception_ptr
69 namespace __exception_ptr
81 void _M_addref() _GLIBCXX_USE_NOEXCEPT;
82 void _M_release() _GLIBCXX_USE_NOEXCEPT;
84 void *_M_get() const _GLIBCXX_NOEXCEPT
__attribute__ ((__pure__));
90 exception_ptr() _GLIBCXX_USE_NOEXCEPT;
92 exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
94 #if __cplusplus >= 201103L
95 exception_ptr(nullptr_t) noexcept
96 : _M_exception_object(0)
99 exception_ptr(exception_ptr&& __o) noexcept
100 : _M_exception_object(__o._M_exception_object)
101 { __o._M_exception_object = 0; }
104 #if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
105 typedef void (exception_ptr::*__safe_bool)();
108 exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT;
112 operator=(
const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
114 #if __cplusplus >= 201103L
116 operator=(exception_ptr&& __o) noexcept
118 exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*
this);
123 ~exception_ptr() _GLIBCXX_USE_NOEXCEPT;
126 swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
128 #ifdef _GLIBCXX_EH_PTR_COMPAT
130 void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT
132 bool operator!() const _GLIBCXX_USE_NOEXCEPT
134 operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT;
137 #if __cplusplus >= 201103L
138 explicit operator bool()
const
139 {
return _M_exception_object; }
143 operator==(
const exception_ptr&,
const exception_ptr&)
147 __cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT
152 operator==(const exception_ptr&, const exception_ptr&)
156 operator!=(const exception_ptr&, const exception_ptr&)
160 swap(exception_ptr& __lhs, exception_ptr& __rhs)
161 { __lhs.swap(__rhs); }
167 template<
typename _Ex>
186 template<
typename _Ex>
189 {
return std::copy_exception<_Ex>(__ex); }
196 #pragma GCC visibility pop
bool operator==(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
exception_ptr make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
Obtain an exception_ptr pointing to a copy of the supplied object.
Definition: exception_ptr.h:188
double __v4df __attribute__((__vector_size__(32)))
Definition: avxintrin.h:32
#define __try
Definition: exception_defines.h:35
Part of RTTI.
Definition: typeinfo:88
#define bool
Definition: stdbool.h:33
exception_ptr copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
Obtain an exception_ptr pointing to a copy of the supplied object.
Definition: exception_ptr.h:169
void rethrow_exception(exception_ptr) __attribute__((__noreturn__))
Throw the object pointed to by the exception_ptr.
An opaque pointer to an arbitrary exception.
Definition: exception_ptr.h:75
#define __catch(X)
Definition: exception_defines.h:36
exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160
void * _M_exception_object
Definition: exception_ptr.h:77