|
20 | 20 | #include <catch2/internal/catch_output_redirect.hpp> |
21 | 21 | #include <catch2/internal/catch_assertion_handler.hpp> |
22 | 22 | #include <catch2/internal/catch_test_failure_exception.hpp> |
| 23 | +#include <catch2/internal/catch_thread_local.hpp> |
23 | 24 | #include <catch2/internal/catch_result_type.hpp> |
24 | 25 |
|
25 | 26 | #include <cassert> |
@@ -175,25 +176,25 @@ namespace Catch { |
175 | 176 | // from heap, to avoid consuming too much thread-local storage. |
176 | 177 |
|
177 | 178 | // This is used for the "if" part of CHECKED_IF/CHECKED_ELSE |
178 | | - static thread_local bool g_lastAssertionPassed = false; |
| 179 | + static CATCH_INTERNAL_THREAD_LOCAL bool g_lastAssertionPassed = false; |
179 | 180 |
|
180 | 181 | // This is the source location for last encountered macro. It is |
181 | 182 | // used to provide the users with more precise location of error |
182 | 183 | // when an unexpected exception/fatal error happens. |
183 | | - static thread_local SourceLineInfo g_lastKnownLineInfo("DummyLocation", static_cast<size_t>(-1)); |
| 184 | + static CATCH_INTERNAL_THREAD_LOCAL SourceLineInfo g_lastKnownLineInfo("DummyLocation", static_cast<size_t>(-1)); |
184 | 185 |
|
185 | 186 | // Should we clear message scopes before sending off the messages to |
186 | 187 | // reporter? Set in `assertionPassedFastPath` to avoid doing the full |
187 | 188 | // clear there for performance reasons. |
188 | | - static thread_local bool g_clearMessageScopes = false; |
| 189 | + static CATCH_INTERNAL_THREAD_LOCAL bool g_clearMessageScopes = false; |
189 | 190 |
|
190 | 191 | CATCH_INTERNAL_START_WARNINGS_SUPPRESSION |
191 | 192 | CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS |
192 | 193 | // Actual messages to be provided to the reporter |
193 | | - static thread_local std::vector<MessageInfo> g_messages; |
| 194 | + static CATCH_INTERNAL_THREAD_LOCAL std::vector<MessageInfo> g_messages; |
194 | 195 |
|
195 | 196 | // Owners for the UNSCOPED_X information macro |
196 | | - static thread_local std::vector<ScopedMessage> g_messageScopes; |
| 197 | + static CATCH_INTERNAL_THREAD_LOCAL std::vector<ScopedMessage> g_messageScopes; |
197 | 198 | CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION |
198 | 199 |
|
199 | 200 | } // namespace Detail |
|
0 commit comments