31#ifndef _EXCEPTION_PTR_H
32#define _EXCEPTION_PTR_H
34#pragma GCC visibility push(default)
42#if __cplusplus >= 201103L
57 namespace __exception_ptr
62 using __exception_ptr::exception_ptr;
86 void* _M_exception_object;
97 template<
typename _Ex>
105#if __cplusplus >= 201103L
107 : _M_exception_object(0)
111 : _M_exception_object(
__o._M_exception_object)
112 {
__o._M_exception_object = 0; }
115#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
125#if __cplusplus >= 201103L
139#ifdef _GLIBCXX_EH_PTR_COMPAT
148#if __cplusplus >= 201103L
149 explicit operator bool()
const
150 {
return _M_exception_object; }
179 template<
typename _Ex>
182 {
static_cast<_Ex*
>(__x)->~
_Ex(); }
188 template<
typename _Ex>
192#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI \
193 && __cplusplus >= 201103L
195 void* __e = __cxxabiv1::__cxa_allocate_exception(
sizeof(
_Ex));
196 (
void) __cxxabiv1::__cxa_init_primary_exception(
198 __exception_ptr::__dest_thunk<_Ex2>);
206 __cxxabiv1::__cxa_free_exception(__e);
209#elif __cpp_exceptions
228#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)
Throw the object pointed to by the exception_ptr.
ISO C++ entities toplevel namespace is std.
An opaque pointer to an arbitrary exception.