lib/fmt/SystemError: add VFmtErrno()
This commit is contained in:
parent
acc92b156b
commit
1c37b0487c
@ -67,6 +67,15 @@ FmtLastError(const S &format_str, Args&&... args) noexcept
|
|||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
[[nodiscard]] [[gnu::pure]]
|
||||||
|
inline std::system_error
|
||||||
|
VFmtErrno(int code,
|
||||||
|
fmt::string_view format_str, fmt::format_args args) noexcept
|
||||||
|
{
|
||||||
|
return VFmtSystemError(std::error_code(code, ErrnoCategory()),
|
||||||
|
format_str, args);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename S, typename... Args>
|
template<typename S, typename... Args>
|
||||||
requires(std::is_convertible_v<S, fmt::string_view>)
|
requires(std::is_convertible_v<S, fmt::string_view>)
|
||||||
[[nodiscard]] [[gnu::pure]]
|
[[nodiscard]] [[gnu::pure]]
|
||||||
|
Loading…
Reference in New Issue
Block a user