Skip to content

Commit

Permalink
Merge pull request #210 from arximboldi/fix-exceptions-gcc
Browse files Browse the repository at this point in the history
Detect exceptions in a more cross platform manner
  • Loading branch information
arximboldi authored Sep 17, 2024
2 parents 590da88 + 167f7b8 commit 62aed89
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lager/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#endif

#if !defined(LAGER_USE_EXCEPTIONS) && !defined(LAGER_NO_EXCEPTIONS)
#ifdef __has_feature
#if !__has_feature(cxx_exceptions)
#if defined(_MSC_VER)
#if !_HAS_EXCEPTIONS
#define LAGER_NO_EXCEPTIONS
#endif
#else
#if !__cpp_exceptions
#define LAGER_NO_EXCEPTIONS
#endif
#endif
Expand All @@ -43,4 +47,3 @@
#define LAGER_THROW(expr) throw expr
#define LAGER_RETHROW throw
#endif

0 comments on commit 62aed89

Please sign in to comment.