mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd: Add make_error_code(std::system_error) for completeness.
This commit is contained in:
parent
671170afb4
commit
ed6dc56d35
2 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,7 @@ namespace ircd
|
|||
// util
|
||||
std::error_code make_error_code(const int &code = errno);
|
||||
std::error_code make_error_code(const std::error_code &);
|
||||
std::error_code make_error_code(const std::system_error &);
|
||||
std::error_code make_error_code(const boost::system::error_code &);
|
||||
std::error_code make_error_code(const boost::system::system_error &);
|
||||
std::system_error make_system_error(const int &code = errno);
|
||||
|
|
|
@ -135,6 +135,12 @@ ircd::make_error_code(const boost::system::error_code &ec)
|
|||
};
|
||||
}
|
||||
|
||||
std::error_code
|
||||
ircd::make_error_code(const std::system_error &e)
|
||||
{
|
||||
return e.code();
|
||||
}
|
||||
|
||||
std::error_code
|
||||
ircd::make_error_code(const int &code)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue