Header file system_code_from_exception.hpp

#include "system_code.hpp"

namespace system_error2
{
    system_error2::system_code system_code_from_exception(std::exception_ptr&& ep = std::current_exception(, system_error2::system_code not_matched = generic_code(errc::resource_unavailable_try_again) noexcept;
}

Function system_error2::system_code_from_exception

system_error2::system_code system_code_from_exception(std::exception_ptr&& ep = std::current_exception(, system_error2::system_code not_matched = generic_code(errc::resource_unavailable_try_again) noexcept;

A utility function which returns the closest matching system_code to a supplied exception ptr.