diff --git a/include/fmt/base.h b/include/fmt/base.h index fb3a23ef..5c37dfc7 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -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 diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index bc8730c4..e4dd7ea8 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -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); diff --git a/include/fmt/format.h b/include/fmt/format.h index 60ec1f7d..acbfe563 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -122,7 +122,7 @@ template <> struct iterator_traits { } // namespace std #ifndef FMT_THROW -# if FMT_EXCEPTIONS +# if FMT_USE_EXCEPTIONS # if FMT_MSC_VERSION || defined(__NVCC__) FMT_BEGIN_NAMESPACE namespace detail {