31#ifndef _EXCEPTION_PTR_H
32#define _EXCEPTION_PTR_H
34#pragma GCC visibility push(default)
42#if __cplusplus >= 201103L
56 namespace __exception_ptr
61 using __exception_ptr::exception_ptr;
85 void* _M_exception_object;
96 template<
typename _Ex>
104#if __cplusplus >= 201103L
106 : _M_exception_object(0)
110 : _M_exception_object(
__o._M_exception_object)
111 {
__o._M_exception_object = 0; }
114#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
124#if __cplusplus >= 201103L
138#ifdef _GLIBCXX_EH_PTR_COMPAT
147#if __cplusplus >= 201103L
148 explicit operator bool()
const
149 {
return _M_exception_object; }
173 template<
typename _Ex>
175 __dest_thunk(
void* __x)
176 {
static_cast<_Ex*
>(__x)->~
_Ex(); }
181 template<
typename _Ex>
185#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI \
186 && __cplusplus >= 201103L
188 void* __e = __cxxabiv1::__cxa_allocate_exception(
sizeof(
_Ex));
189 (
void) __cxxabiv1::__cxa_init_primary_exception(
191 __exception_ptr::__dest_thunk<_Ex2>);
199 __cxxabiv1::__cxa_free_exception(__e);
202#elif __cpp_exceptions
221#pragma GCC visibility pop
exception_ptr current_exception() noexcept
exception_ptr make_exception_ptr(_Ex) noexcept
Obtain an exception_ptr pointing to a copy of the supplied object.
void rethrow_exception(exception_ptr) __attribute__((__noreturn__))
Throw the object pointed to by the exception_ptr.
ISO C++ entities toplevel namespace is std.
An opaque pointer to an arbitrary exception.