Don't use format_error if exceptions disabled

This commit is contained in:
Victor Zverovich 2024-09-08 15:56:36 -07:00
parent 967e2d177d
commit 70643b2511

View File

@ -131,7 +131,12 @@ FMT_FUNC auto write_loc(appender out, loc_value value,
} // namespace detail
FMT_FUNC void report_error(const char* message) {
FMT_THROW(format_error(message));
#if FMT_EXCEPTIONS
throw format_error(message);
#else
fputs(message, stderr);
abort();
#endif
}
template <typename Locale> typename Locale::id format_facet<Locale>::id;