using exception_ptr = unspecified;
exception_Βptr shall satisfy the requirements of NullablePointer.
Two non-null values of type exception_Βptr are equivalent and compare equal if and only if they refer to the same exception.
exception_Βptr shall not be implicitly convertible to any arithmetic, enumeration, or pointer type.
[βNote: An implementation might use a reference-counted smart pointer as exception_Βptr. βββend noteβ]
For purposes of determining the presence of a data race, operations on exception_Βptr objects shall access and modify only the exception_Βptr objects themselves and not the exceptions they refer to. Use of rethrow_Βexception on exception_Βptr objects that refer to the same exception object shall not introduce a data race. [βNote: If rethrow_Βexception rethrows the same exception object (rather than a copy), concurrent access to that rethrown exception object may introduce a data race. Changes in the number of exception_Βptr objects that refer to a particular exception do not introduce a data race. βββend noteβ]
exception_ptr current_exception() noexcept;
Returns: An exception_Βptr object that refers to the currently handled exception or a copy of the currently handled exception, or a null exception_Βptr object if no exception is being handled. The referenced object shall remain valid at least as long as there is an exception_Βptr object that refers to it. If the function needs to allocate memory and the attempt fails, it returns an exception_Βptr object that refers to an instance of bad_Βalloc. It is unspecified whether the return values of two successive calls to current_Βexception refer to the same exception object. [βNote: That is, it is unspecified whether current_Βexception creates a new copy each time it is called. βββend noteβ] If the attempt to copy the current exception object throws an exception, the function returns an exception_Βptr object that refers to the thrown exception or, if this is not possible, to an instance of bad_Βexception. [βNote: The copy constructor of the thrown exception may also fail, so the implementation is allowed to substitute a bad_Βexception object to avoid infinite recursion.βββend noteβ]
[[noreturn]] void rethrow_exception(exception_ptr p);
template<class E> exception_ptr make_exception_ptr(E e) noexcept;
Effects: Creates an exception_Βptr object that refers to a copy of e, as if:
try { throw e; } catch(...) { return current_exception(); }