summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-01-28 21:14:20 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-02 10:35:22 +0100
commit29c80d0232b50a54f88e327db7c86492d659de65 (patch)
tree16307cda85ea0483bfbf80ed2c478f6647f29e1d /src/dbus
parent02c3e955e375c803c524495b25e5054eebf18509 (diff)
Make sure we don't have an operator void(), ICC doesn't like it.
ICC is right: this function will never be called. But we didn't want it called anyway. Just make it be something non-void. qdbuspendingreply.h(185): error #597: "QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator void() const [with T1=void, T2=void, T3=void, T4=void, T5=void, T6=void, T7=void, T8=void]" will not be called for implicit or explicit conversions Change-Id: I5e067bd03aafc6d6772cc1e0f8f8ae8bfa1712d7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbuspendingreply.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index d92c817a0a..b7e459f7a7 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -105,6 +105,10 @@ namespace QDBusPendingReplyTypes {
static inline void fillMetaTypes(int *)
{ }
};
+
+ struct TypeIsVoid {};
+ template <typename T> struct NotVoid { typedef T Type; };
+ template <> struct NotVoid<void> { typedef TypeIsVoid Type; };
} // namespace QDBusPendingReplyTypes
template<typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
@@ -176,7 +180,7 @@ public:
return argumentAt<0>();
}
- inline operator typename Select<0>::Type() const
+ inline operator typename QDBusPendingReplyTypes::NotVoid<T1>::Type() const
{
return argumentAt<0>();
}