From 1c9b0eb64045d476f7856cce2dfc68860a855130 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 20 Sep 2012 18:32:37 +0200 Subject: [PATCH] Workaround MSVC2008 build failure after switching to std::lower_bound MSVC2008 tries to see if a container is fully ordered. This causes a build failure when operator< is not defined between the elements in the container (but is instead defined between the element type and the item passed to std::lower_bound). Change-Id: I093d6f67f64a247f0aae763acb35ee73614f4208 Reviewed-by: Andreas Holzammer Reviewed-by: Simon Hausmann --- src/network/access/qnetworkaccessauthenticationmanager_p.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/access/qnetworkaccessauthenticationmanager_p.h b/src/network/access/qnetworkaccessauthenticationmanager_p.h index ad7102a5e87..992cc34e437 100644 --- a/src/network/access/qnetworkaccessauthenticationmanager_p.h +++ b/src/network/access/qnetworkaccessauthenticationmanager_p.h @@ -79,6 +79,10 @@ public: Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE); inline bool operator<(const QNetworkAuthenticationCredential &t1, const QString &t2) { return t1.domain < t2; } +inline bool operator<(const QString &t1, const QNetworkAuthenticationCredential &t2) +{ return t1 < t2.domain; } +inline bool operator<(const QNetworkAuthenticationCredential &t1, const QNetworkAuthenticationCredential &t2) +{ return t1.domain < t2.domain; } class QNetworkAccessAuthenticationManager {