FMT_EXCEPTIONS -> FMT_USE_EXCEPTIONS

This commit is contained in:
Victor Zverovich 2024-09-11 19:34:12 -07:00
parent 89999f1672
commit b6a6ec7f1c
3 changed files with 7 additions and 7 deletions

View File

@ -144,16 +144,16 @@
#endif
// Check if exceptions are disabled.
#ifdef FMT_EXCEPTIONS
#ifdef FMT_USE_EXCEPTIONS
// Use the provided definition.
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
# define FMT_EXCEPTIONS 0
# define FMT_USE_EXCEPTIONS 0
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
# define FMT_EXCEPTIONS 0
# define FMT_USE_EXCEPTIONS 0
#else
# define FMT_EXCEPTIONS 1
# define FMT_USE_EXCEPTIONS 1
#endif
#if FMT_EXCEPTIONS
#if FMT_USE_EXCEPTIONS
# define FMT_TRY try
# define FMT_CATCH(x) catch (x)
#else

View File

@ -129,7 +129,7 @@ FMT_FUNC auto write_loc(appender out, loc_value value,
} // namespace detail
FMT_FUNC void report_error(const char* message) {
#if FMT_EXCEPTIONS
#if FMT_USE_EXCEPTIONS
throw format_error(message);
#else
fputs(message, stderr);

View File

@ -122,7 +122,7 @@ template <> struct iterator_traits<fmt::appender> {
} // namespace std
#ifndef FMT_THROW
# if FMT_EXCEPTIONS
# if FMT_USE_EXCEPTIONS
# if FMT_MSC_VERSION || defined(__NVCC__)
FMT_BEGIN_NAMESPACE
namespace detail {