diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h index a23dbb53cd..92bcb0df9c 100644 --- a/src/corelib/global/qflags.h +++ b/src/corelib/global/qflags.h @@ -218,6 +218,7 @@ QT_DECLARE_TYPESAFE_OPERATORS_FOR_FLAGS_ENUM(Flags) #if __cplusplus > 201702L // assume compilers don't warn if in C++17 mode // in C++20 mode, provide user-defined operators to override the deprecated operations: # define Q_DECLARE_MIXED_ENUM_OPERATOR(op, Ret, LHS, RHS) \ + [[maybe_unused]] \ constexpr inline Ret operator op (LHS lhs, RHS rhs) noexcept \ { return static_cast(qToUnderlying(lhs) op qToUnderlying(rhs)); } \ /* end */