public member function
<exception>

std::nested_exception::nested_exception

default (1)
nested_exception() noexcept;
copy (2)
nested_exception (const nested_exception& e) noexcept = default;
Construct nested_exception
Constructs a nested_exception object.

The default constructor (1) stores in the object an exception_ptr that points to the currently handled exception, as returned by current_exception. If no exception is being handled, the object stores a null exception_ptr.

The copy constructor (2) is explicitly defaulted.

Parameters

e
Another nested_exception object.

Example

See nested_exception.

Exception safety

No-throw guarantee: this member function never throws exceptions.

See also