Skip to content

Commit 62aed89

Browse files
authored
Merge pull request #210 from arximboldi/fix-exceptions-gcc
Detect exceptions in a more cross platform manner
2 parents 590da88 + 167f7b8 commit 62aed89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lager/config.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@
2121
#endif
2222

2323
#if !defined(LAGER_USE_EXCEPTIONS) && !defined(LAGER_NO_EXCEPTIONS)
24-
#ifdef __has_feature
25-
#if !__has_feature(cxx_exceptions)
24+
#if defined(_MSC_VER)
25+
#if !_HAS_EXCEPTIONS
26+
#define LAGER_NO_EXCEPTIONS
27+
#endif
28+
#else
29+
#if !__cpp_exceptions
2630
#define LAGER_NO_EXCEPTIONS
2731
#endif
2832
#endif
@@ -43,4 +47,3 @@
4347
#define LAGER_THROW(expr) throw expr
4448
#define LAGER_RETHROW throw
4549
#endif
46-

0 commit comments

Comments
 (0)