Skip to content

Commit

Permalink
FMT_EXCEPTIONS -> FMT_USE_EXCEPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Sep 12, 2024
1 parent 89999f1 commit b6a6ec7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b6a6ec7

Please sign in to comment.