std::make_exception_ptr

Header: <exception>

Creates an std::exception_ptr that holds a reference to a copy of e. This is done as if executing the following code:

# Declarations

template< class E >
std::exception_ptr make_exception_ptr( E e ) noexcept;

(since C++11) (constexpr since C++26)

# Parameters

# 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).

# Notes

The parameter is passed by value and is subject to slicing.

# Example

This section is incompleteReason: no example

# See also