Daily bit(e) of C++ | std::error_code, std::error_category
Daily bit(e) of C++ #378, The C++11 strong type for holding error codes: std::error_code.
std::error_code is a strong type for holding an error code.
Error codes are constructed from an enumeration accompanied by an explanation type derived from std::error_category.
The standard provides std::errc for system errors, std::io_errc for std::iostream and std::future_errc for std::future.