From ff30a91eedd30c0e2e0b62ad50ade3d7d27651a8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 27 Mar 2009 21:50:41 +0100 Subject: Add the parameter to the function call. Apparently we have a problem with these default parameters. We have basically: template void func(T * = 0); template<> void func(Something *); Now, according to GCC, I can't add "= 0" to the template specialisation. However, MSVC 2008 isn't able to call the specialisation without my extra 0 here. I've seen a similar issue before in QSharedPointer. I don't think this is a big deal because the error message output by MSVC 2008 indicates this is likely a compiler bug: qdbuspendingreply.h(98) : error C2440: 'default argument': cannot convert from 'T1 *' to 'QVariant *' where [ T1=QVariant ] --- src/dbus/qdbuspendingreply.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h index 3880a7f..5ec9800 100644 --- a/src/dbus/qdbuspendingreply.h +++ b/src/dbus/qdbuspendingreply.h @@ -95,7 +95,7 @@ namespace QDBusPendingReplyTypes { enum { Total = Next::Total + 1 }; static inline void fillMetaTypes(int *p) { - *p = metaTypeFor(); + *p = metaTypeFor(0); Next::fillMetaTypes(++p); } }; @@ -171,7 +171,7 @@ public: Q_ASSERT_X(Index < count() && Index >= 0, "QDBusPendingReply::argumentAt", "Index out of bounds"); typedef typename Select::Type ResultType; - return qdbus_cast(argumentAt(Index)); + return qdbus_cast(argumentAt(Index), 0); } inline typename Select<0>::Type value() const -- cgit v0.12