Skip to content

Commit 20b1ea9

Browse files
authored
fix(Mutex): C++ 20 does not guarantee atomic_flag.test #5352 (#5353)
1 parent f20351b commit 20b1ea9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Foundation/src/Mutex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace {
6666
// to avoid cache line bouncing, then attempts acquire if lock appears free.
6767
inline bool tryAcquire(std::atomic_flag& flag)
6868
{
69-
#if POCO_HAVE_CPP20_COMPILER
69+
#if defined(__cpp_lib_atomic_flag_test)
7070
if (!flag.test(std::memory_order_relaxed))
7171
if (!flag.test_and_set(std::memory_order_acquire))
7272
return true;

0 commit comments

Comments
 (0)