From abaa3e61120529b656922c2272b99a674d9e1a38 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 7 Dec 2022 11:16:05 -0800 Subject: [PATCH] tst_qdbusmetatype: fix build with Clang (and probably MSVC) This test makes use of a GCC extension-slash-defect in matching of template template parameters. Either Clang has recently changed its behavior not to accept them any more, or we've never compiled this test with Clang. Tested with Clang 15.0.6. Pick-to: 6.4 Change-Id: I69ecc04064514f939896fffd172e98d826989ca3 Reviewed-by: Marc Mutz --- tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp index 8749d885365..295ebc1828e 100644 --- a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp +++ b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp @@ -245,7 +245,14 @@ void tst_QDBusMetaType::initTestCase() qDBusRegisterMetaType >(); qDBusRegisterMetaType >(); +#ifdef Q_CC_GNU_ONLY + // GCC has a defect/extension (depending on your point of view) that allows + // a template class with defaulted template parameters to match a Template + // Template Parameter (TTP) with fewer template arguments. The call below + // tries to use the template