Merge tag 'v0.21.17'

release v0.21.17
This commit is contained in:
Max Kellermann
2019-12-16 23:43:51 +01:00
18 changed files with 94 additions and 23 deletions

View File

@@ -147,6 +147,18 @@ FormatErrno(const char *fmt, Args&&... args) noexcept
return FormatErrno(errno, fmt, std::forward<Args>(args)...);
}
template<typename... Args>
static inline std::system_error
FormatFileNotFound(const char *fmt, Args&&... args) noexcept
{
#ifdef _WIN32
return FormatLastError(ERROR_FILE_NOT_FOUND, fmt,
std::forward<Args>(args)...);
#else
return FormatErrno(ENOENT, fmt, std::forward<Args>(args)...);
#endif
}
gcc_pure
inline bool
IsErrno(const std::system_error &e, int code) noexcept