Skip to content

Commit

Permalink
Added a FMT_STRING wrapper for system_error() call.
Browse files Browse the repository at this point in the history
This enables the use of FMT_ENFORCE_COMPILE_STRING on MSVC 2019.
  • Loading branch information
madmaxoft committed Jun 6, 2022
1 parent 4bb3af7 commit 3ae8bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ FMT_FUNC void report_error(format_func func, int error_code,
inline void fwrite_fully(const void* ptr, size_t size, size_t count,
FILE* 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
Expand Down

0 comments on commit 3ae8bff

Please sign in to comment.