File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Include/internal/mimalloc/mimalloc Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ terms of the MIT license. A copy of the license can be found in the file
2323#define _Atomic (tp ) std::atomic<tp>
2424#define mi_atomic (name ) std::atomic_##name
2525#define mi_memory_order (name ) std::memory_order_##name
26- #if !defined(ATOMIC_VAR_INIT) || (__cplusplus >= 202002L) // c++20, see issue #571
26+ #if (__cplusplus >= 202002L) // c++20, see issue #571
27+ #define MI_ATOMIC_VAR_INIT (x ) x
28+ #elif !defined(ATOMIC_VAR_INIT)
2729 #define MI_ATOMIC_VAR_INIT (x ) x
2830#else
2931 #define MI_ATOMIC_VAR_INIT (x ) ATOMIC_VAR_INIT(x)
@@ -39,7 +41,9 @@ terms of the MIT license. A copy of the license can be found in the file
3941#include < stdatomic.h>
4042#define mi_atomic (name ) atomic_##name
4143#define mi_memory_order (name ) memory_order_##name
42- #if !defined(ATOMIC_VAR_INIT) || (__STDC_VERSION__ >= 201710L) // c17, see issue #735
44+ #if (__STDC_VERSION__ >= 201710L) // c17, see issue #735
45+ #define MI_ATOMIC_VAR_INIT (x ) x
46+ #elif !defined(ATOMIC_VAR_INIT)
4347 #define MI_ATOMIC_VAR_INIT (x ) x
4448#else
4549 #define MI_ATOMIC_VAR_INIT (x ) ATOMIC_VAR_INIT(x)
Original file line number Diff line number Diff line change 1+ Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc.
You can’t perform that action at this time.
0 commit comments