mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-09 12:50:05 +00:00
FMT_EXCEPTIONS -> FMT_USE_EXCEPTIONS
This commit is contained in:
parent
89999f1672
commit
b6a6ec7f1c
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user