forked from fmtlib/fmt
Fix error: cannot use 'try' with exceptions disabled in Win LLVM Clang (#4208)
Fixes #4207. LLVM Clang on Windows does not define `__GNUC__`. The preprocessor falls to `#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS` with `_HAS_EXCEPTIONS 1` defined in vcruntime.h:104.
This commit is contained in:
@@ -146,6 +146,8 @@
|
|||||||
// Use the provided definition.
|
// Use the provided definition.
|
||||||
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
|
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
|
||||||
# define FMT_USE_EXCEPTIONS 0
|
# define FMT_USE_EXCEPTIONS 0
|
||||||
|
#elif defined(__clang__) && !defined(__cpp_exceptions)
|
||||||
|
# define FMT_USE_EXCEPTIONS 0
|
||||||
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
|
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
|
||||||
# define FMT_USE_EXCEPTIONS 0
|
# define FMT_USE_EXCEPTIONS 0
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user