Defined in header <exception> | ||||
---|---|---|---|---|
| (since C++11) |
Creates an std::exception_ptr
that holds a reference to a copy of e
. This is done as if executing the following code:
1 2 3 4 5 | try { throw e; } catch (...) { return std::current_exception(); } |
Parameters
(none).
Return value
An instance of std::exception_ptr
holding a reference to the copy of e
, or to an instance of std::bad_alloc
or to an instance of std::bad_exception
(see std::current_exception
).
Exceptions
noexcept
specification: noexcept
Notes
The parameter is passed by value and is subject to slicing.
See also
(C++11) | captures the current exception in a std::exception_ptr (function) |
Please login to continue.