File tree 2 files changed +7
-2
lines changed
Include/internal/mimalloc/mimalloc
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
23
23
#define _Atomic (tp ) std::atomic<tp>
24
24
#define mi_atomic (name ) std::atomic_##name
25
25
#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)
27
29
#define MI_ATOMIC_VAR_INIT (x ) x
28
30
#else
29
31
#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
39
41
#include < stdatomic.h>
40
42
#define mi_atomic (name ) atomic_##name
41
43
#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)
43
47
#define MI_ATOMIC_VAR_INIT (x ) x
44
48
#else
45
49
#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