system/Error: remove unused function FormatSystemError()
This commit is contained in:
parent
0c102a8f2f
commit
ce0b4d5c19
|
@ -6,16 +6,6 @@
|
||||||
#include <system_error> // IWYU pragma: export
|
#include <system_error> // IWYU pragma: export
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
static inline std::system_error
|
|
||||||
FormatSystemError(std::error_code code, const char *fmt,
|
|
||||||
Args&&... args) noexcept
|
|
||||||
{
|
|
||||||
char buffer[1024];
|
|
||||||
snprintf(buffer, sizeof(buffer), fmt, std::forward<Args>(args)...);
|
|
||||||
return std::system_error(code, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <errhandlingapi.h> // for GetLastError()
|
#include <errhandlingapi.h> // for GetLastError()
|
||||||
|
|
Loading…
Reference in New Issue