diff options
| author | Martin Hořeňovský | 2025-12-01 14:18:54 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-12-02 14:01:55 +0100 |
| commit | 32eac2d1bb63d6b58a32e341e22b9438f1bd041a (patch) | |
| tree | ae6bce085b5422e93679c9b6d538451bb8e544d0 /src/catch2/internal/catch_message_info.cpp | |
| parent | e849735e11f23ce9ec819e053b107f2ec3c3c1c4 (diff) | |
| download | catch3-32eac2d1bb63d6b58a32e341e22b9438f1bd041a.tar.gz | |
Only use thread_local in builds with thread safety enabled
MSVC cannot dllexport thread_local variables, so we avoid making
globals thread local if we won't support multiple threads anyway.
Closes #3044
Diffstat (limited to 'src/catch2/internal/catch_message_info.cpp')
| -rw-r--r-- | src/catch2/internal/catch_message_info.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_message_info.cpp b/src/catch2/internal/catch_message_info.cpp index bc887abf..2352f36c 100644 --- a/src/catch2/internal/catch_message_info.cpp +++ b/src/catch2/internal/catch_message_info.cpp @@ -21,6 +21,6 @@ namespace Catch { // Messages are owned by their individual threads, so the counter should be thread-local as well. // Alternative consideration: atomic, so threads don't share IDs and things are easier to debug. - thread_local unsigned int MessageInfo::globalCount = 0; + CATCH_INTERNAL_THREAD_LOCAL unsigned int MessageInfo::globalCount = 0; } // end namespace Catch |