diff --git a/src/corelib/thread/qwaitcondition_p.h b/src/corelib/thread/qwaitcondition_p.h index 14833d56eff..c99fa8d6923 100644 --- a/src/corelib/thread/qwaitcondition_p.h +++ b/src/corelib/thread/qwaitcondition_p.h @@ -28,7 +28,7 @@ namespace QtPrivate { // Ideal alignment for mutex and condition_variable: it's the hardware // interference size (size of a cache line) if the types are likely to contain // the actual data structures, otherwise just that of a pointer. -static constexpr quintptr IdealMutexAlignment = +inline constexpr quintptr IdealMutexAlignment = sizeof(std::mutex) > sizeof(void *) && sizeof(std::condition_variable) > sizeof(void *) ? 64 : alignof(void*);