diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:01:21 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:01:21 +0200 |
commit | b962d4fd3f8e802b99bd9c074851fd0f05a12adb (patch) | |
tree | 13a12ded9c3a9713a8c368975a95f5efe6ec997c /zen/scope_guard.h | |
parent | 9.2 (diff) | |
download | FreeFileSync-b962d4fd3f8e802b99bd9c074851fd0f05a12adb.tar.gz FreeFileSync-b962d4fd3f8e802b99bd9c074851fd0f05a12adb.tar.bz2 FreeFileSync-b962d4fd3f8e802b99bd9c074851fd0f05a12adb.zip |
9.3
Diffstat (limited to 'zen/scope_guard.h')
-rwxr-xr-x | zen/scope_guard.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zen/scope_guard.h b/zen/scope_guard.h index b336ad53..f4ffc92b 100755 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -13,7 +13,7 @@ //std::uncaught_exceptions() currently unsupported on GCC and Clang => clean up ASAP - static_assert(__GNUC__ < 6 || (__GNUC__ == 6 && (__GNUC_MINOR__ < 3 || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ <= 1))), "check std::uncaught_exceptions support"); + static_assert(__GNUC__ < 7 || (__GNUC__ == 7 && (__GNUC_MINOR__ < 1 || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1))), "check std::uncaught_exceptions support"); namespace __cxxabiv1 { @@ -21,7 +21,8 @@ struct __cxa_eh_globals; extern "C" __cxa_eh_globals* __cxa_get_globals() noexcept; } -inline int getUncaughtExceptionCount() +inline +int getUncaughtExceptionCount() { return *(reinterpret_cast<unsigned int*>(static_cast<char*>(static_cast<void*>(__cxxabiv1::__cxa_get_globals())) + sizeof(void*))); } |