diff options
Diffstat (limited to 'src/corelib/arch/qatomic_cxx11.h')
-rw-r--r-- | src/corelib/arch/qatomic_cxx11.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/arch/qatomic_cxx11.h b/src/corelib/arch/qatomic_cxx11.h index 09e900f4ea..0e06ca951a 100644 --- a/src/corelib/arch/qatomic_cxx11.h +++ b/src/corelib/arch/qatomic_cxx11.h @@ -328,10 +328,10 @@ template <typename X> struct QAtomicOps } }; -#ifdef ATOMIC_VAR_INIT -# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) } +#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS) +# define Q_BASIC_ATOMIC_INITIALIZER(a) { a } #else -# define Q_BASIC_ATOMIC_INITIALIZER(a) { {a} } +# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) } #endif QT_END_NAMESPACE |