diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index e40cd85..ba68a01 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -826,7 +829,13 @@ struct IsGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; template +#if defined(__clang__) && (__clang_major__ > 11) + // Clang does not reject T::QtGadgetHelper as ambiguous if a class inherits from two QGADGETS + // but is not a QGADGET itself + struct IsGadgetHelper> +#else struct IsGadgetHelper +#endif { template static char checkType(void (X::*)()); @@ -841,7 +850,11 @@ struct IsPointerToGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; template +#if defined(__clang__) && (__clang_major__ > 11) + struct IsPointerToGadgetHelper> +#else struct IsPointerToGadgetHelper +#endif { using BaseType = T; template