Header file system_code_from_exception.hpp

#include "system_code.hpp"

namespace system_error2
{
    int system_code_from_exception(std::exception_ptr&& ep = std::current_exception(, int not_matched) noexcept;
}

Function system_error2::system_code_from_exception

int system_code_from_exception(std::exception_ptr&& ep = std::current_exception(, int not_matched) noexcept;

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