| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | namespace std { |
| |
|
| | namespace __exception_ptr |
| | { |
| |
|
| | struct exception_ptr |
| | { |
| | void* __ptr_; |
| |
|
| | exception_ptr(const exception_ptr&) _NOEXCEPT; |
| | exception_ptr& operator=(const exception_ptr&) _NOEXCEPT; |
| | ~exception_ptr() _NOEXCEPT; |
| | }; |
| |
|
| | } |
| |
|
| | _LIBCUDACXX_NORETURN void rethrow_exception(__exception_ptr::exception_ptr); |
| |
|
| | exception_ptr::~exception_ptr() _NOEXCEPT |
| | { |
| | reinterpret_cast<__exception_ptr::exception_ptr*>(this)->~exception_ptr(); |
| | } |
| |
|
| | exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT |
| | : __ptr_(other.__ptr_) |
| | { |
| | new (reinterpret_cast<void*>(this)) __exception_ptr::exception_ptr( |
| | reinterpret_cast<const __exception_ptr::exception_ptr&>(other)); |
| | } |
| |
|
| | exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT |
| | { |
| | *reinterpret_cast<__exception_ptr::exception_ptr*>(this) = |
| | reinterpret_cast<const __exception_ptr::exception_ptr&>(other); |
| | return *this; |
| | } |
| |
|
| | nested_exception::nested_exception() _NOEXCEPT |
| | : __ptr_(current_exception()) |
| | { |
| | } |
| |
|
| |
|
| | _LIBCUDACXX_NORETURN |
| | void |
| | nested_exception::rethrow_nested() const |
| | { |
| | if (__ptr_ == nullptr) |
| | terminate(); |
| | rethrow_exception(__ptr_); |
| | } |
| |
|
| | _LIBCUDACXX_NORETURN |
| | void rethrow_exception(exception_ptr p) |
| | { |
| | rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p)); |
| | } |
| |
|
| | } |
| |
|