diff options
| author | Benoit Blanchon | 2023-01-17 09:47:20 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-01-18 11:10:26 +0100 |
| commit | 908c370f245956fd5565207db77641ae1e6d2b36 (patch) | |
| tree | b0024ecee718867707af3bcf69ed5421f0f34165 /include/internal | |
| parent | 6c6cfe126aa5f4a0cfbe8e805db550e47e26aab1 (diff) | |
| download | catch3-Catch1.x.tar.gz | |
Fix error: ISO C++ forbids in-class initialization of non-const static member 'm_started'Catch1.x
Diffstat (limited to 'include/internal')
| -rw-r--r-- | include/internal/catch_fatal_condition.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp index 04bb0fbd..cfaeaf68 100644 --- a/include/internal/catch_fatal_condition.hpp +++ b/include/internal/catch_fatal_condition.hpp @@ -30,7 +30,7 @@ namespace Catch { namespace Catch { class FatalConditionHandler { - bool m_started = false; + bool m_started; // Install/disengage implementation for specific platform. // Should be if-defed to work on current platform, can assume @@ -40,7 +40,7 @@ namespace Catch { public: // Should also have platform-specific implementations as needed - FatalConditionHandler() {} + FatalConditionHandler() : m_started(false) {} ~FatalConditionHandler() {} void engage() { @@ -90,7 +90,7 @@ namespace Catch { static PVOID exceptionHandlerHandle = CATCH_NULL; class FatalConditionHandler { - bool m_started = false; + bool m_started; // Install/disengage implementation for specific platform. // Should be if-defed to work on current platform, can assume @@ -112,7 +112,7 @@ namespace Catch { } public: - FatalConditionHandler() { + FatalConditionHandler() : m_started(false) { ULONG guaranteeSize = static_cast<ULONG>(32 * 1024); if (!SetThreadStackGuarantee(&guaranteeSize)) { // We do not want to fully error out, because needing @@ -150,7 +150,7 @@ namespace Catch { namespace Catch { class FatalConditionHandler { - bool m_started = false; + bool m_started; // Install/disengage implementation for specific platform. // Should be if-defed to work on current platform, can assume @@ -160,7 +160,7 @@ namespace Catch { public: // Should also have platform-specific implementations as needed - FatalConditionHandler() {} + FatalConditionHandler() : m_started(false) {} ~FatalConditionHandler() {} void engage() { @@ -241,7 +241,7 @@ namespace Catch { } class FatalConditionHandler { - bool m_started = false; + bool m_started; // Install/disengage implementation for specific platform. // Should be if-defed to work on current platform, can assume @@ -267,7 +267,7 @@ namespace Catch { } public: - FatalConditionHandler() { + FatalConditionHandler() : m_started(false) { assert(!altStackMem && "Cannot initialize POSIX signal handler when one already exists"); if (altStackSize == 0) { altStackSize = SIGSTKSZ; |