Thread safety in assertions is no longer experimental

This commit is contained in:
Martin Hořeňovský
2025-12-28 21:02:50 +01:00
parent eb3811c555
commit 970ec144f5
8 changed files with 21 additions and 17 deletions
+5 -5
View File
@@ -196,12 +196,12 @@
#endif
#cmakedefine CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS
#cmakedefine CATCH_CONFIG_NO_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS
#cmakedefine CATCH_CONFIG_THREAD_SAFE_ASSERTIONS
#cmakedefine CATCH_CONFIG_NO_THREAD_SAFE_ASSERTIONS
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS ) && \
defined( CATCH_CONFIG_NO_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
# error Cannot force EXPERIMENTAL_THREAD_SAFE_ASSERTIONS to both ON and OFF
#if defined( CATCH_CONFIG_THREAD_SAFE_ASSERTIONS ) && \
defined( CATCH_CONFIG_NO_THREAD_SAFE_ASSERTIONS )
# error Cannot force THREAD_SAFE_ASSERTIONS to both ON and OFF
#endif
+1 -1
View File
@@ -10,7 +10,7 @@
#include <catch2/catch_user_config.hpp>
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
#if defined( CATCH_CONFIG_THREAD_SAFE_ASSERTIONS )
#define CATCH_INTERNAL_THREAD_LOCAL thread_local
#else
#define CATCH_INTERNAL_THREAD_LOCAL
+2 -2
View File
@@ -10,7 +10,7 @@
#include <catch2/catch_user_config.hpp>
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
#if defined( CATCH_CONFIG_THREAD_SAFE_ASSERTIONS )
# include <atomic>
# include <mutex>
#endif
@@ -19,7 +19,7 @@
namespace Catch {
namespace Detail {
#if defined( CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS )
#if defined( CATCH_CONFIG_THREAD_SAFE_ASSERTIONS )
using Mutex = std::mutex;
using LockGuard = std::lock_guard<std::mutex>;
struct AtomicCounts {