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:
Sergey 2024-10-23 10:43:55 -07:00 committed by GitHub
parent e9eaa27e5a
commit 4daa3d591f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,6 +146,8 @@
// Use the provided definition.
#elif defined(__GNUC__) && !defined(__EXCEPTIONS)
# define FMT_USE_EXCEPTIONS 0
#elif defined(__clang__) && !defined(__cpp_exceptions)
# define FMT_USE_EXCEPTIONS 0
#elif FMT_MSC_VERSION && !_HAS_EXCEPTIONS
# define FMT_USE_EXCEPTIONS 0
#else