mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Added a FMT_STRING wrapper for system_error() call.
This enables the use of FMT_ENFORCE_COMPILE_STRING on MSVC 2019.
This commit is contained in:
parent
4bb3af7a6b
commit
48b7e3dafb
@ -80,7 +80,8 @@ FMT_FUNC void report_error(format_func func, int error_code,
|
|||||||
inline void fwrite_fully(const void* ptr, size_t size, size_t count,
|
inline void fwrite_fully(const void* ptr, size_t size, size_t count,
|
||||||
FILE* stream) {
|
FILE* stream) {
|
||||||
size_t written = std::fwrite(ptr, size, count, stream);
|
size_t written = std::fwrite(ptr, size, count, stream);
|
||||||
if (written < count) FMT_THROW(system_error(errno, "cannot write to file"));
|
if (written < count)
|
||||||
|
FMT_THROW(system_error(errno, FMT_STRING("cannot write to file")));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||||
|
Loading…
Reference in New Issue
Block a user