exception_ptr rethrow (Result)

Header file result_exception_ptr_rethrow.hpp

#include "detail/common.hpp"

namespace outcome_v2_xxx
{
    namespace policy
    {
        template <class T, class EC, class E>
        struct exception_ptr_rethrow;

        template <class T, class EC>
        struct exception_ptr_rethrow<T, EC, void>;
    }
}

Struct outcome_v2_xxx::policy::exception_ptr_rethrow

template <class T, class EC, class E>
struct exception_ptr_rethrow;

Policy interpreting EC or E as a type for which trait::has_exception_ptr_v<EC|E> is true.

Any wide attempt to access the successful state where there is none causes: std::rethrow_exception(policy::exception_ptr(.error()|.exception())) appropriately.