Improve check for std::uncaught_exceptions

GCC 8 on MinGW still warns about that.
Check the version of the feature macro and add parens to ensure correct
evaluation.
This commit is contained in:
Alexander Grund 2025-06-09 12:19:12 +02:00
parent 3980cc97e1
commit d8809dca2a
2 changed files with 8 additions and 6 deletions

View file

@ -25,8 +25,9 @@
# endif
#endif
#if defined(__cpp_lib_uncaught_exceptions) || defined(_MSC_VER) && (_MSC_VER >= 1900)
# ifndef MOCK_NO_UNCAUGHT_EXCEPTIONS
#ifndef MOCK_NO_UNCAUGHT_EXCEPTIONS
# if(defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411) || \
(defined(_MSC_VER) && _MSC_VER >= 1900)
# define MOCK_UNCAUGHT_EXCEPTIONS
# endif
#endif