From 9f96e4f431980e33429f8d85cb60e41bd89edbae Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 8 Dec 2016 14:31:24 -0800 Subject: Work around old Clang bug parsing of NSDMI referring to members Clang pre-3.4 didn't like this and it's used in Xcode 5.1 (which we need to support for 5.8). error: 'this' cannot be implicitly captured in this context typename T::const_iterator i = c.begin(), e = c.end(); ^ Task-number: QTBUG-57488 Change-Id: I63e21df51c7448bc8b5ffffd148e688d7c9b89d6 Reviewed-by: Marc Mutz --- src/corelib/global/qglobal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1737f58c87..32176913ea 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -921,10 +921,10 @@ template class QForeachContainer { QForeachContainer &operator=(const QForeachContainer &) Q_DECL_EQ_DELETE; public: - QForeachContainer(const T &t) : c(t) {} - QForeachContainer(T &&t) : c(std::move(t)) {} + QForeachContainer(const T &t) : c(t), i(c.begin()), e(c.end()) {} + QForeachContainer(T &&t) : c(std::move(t)), i(c.begin()), e(c.end()) {} const T c; - typename T::const_iterator i = c.begin(), e = c.end(); + typename T::const_iterator i, e; int control = 1; }; -- cgit v1.2.3