Header file error.hpp

#include "errored_status_code.hpp"

#include "system_code.hpp"

namespace system_error2
{
    using error = errored_status_code<erased<system_code::value_type>>;
}

Type alias system_error2::error

using error = errored_status_code<erased<system_code::value_type>>;

An erased system_code which is always a failure. The closest equivalent to std::error_code, except it cannot be null and cannot be modified.

This refines system_code into an error object meeting the requirements of P0709 Zero-overhead deterministic exceptions.

Differences from system_code:

As with system_code, it remains guaranteed to be two CPU registers in size, and move relocating.