diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-12-08 14:31:24 -0800 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-12-16 04:05:56 +0000 |
commit | 9f96e4f431980e33429f8d85cb60e41bd89edbae (patch) | |
tree | 5960df4f0f060487c2a765aa2edc958137f9e0bf | |
parent | d8b678661b962c45e6aeb3e61856b823bcfee272 (diff) |
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 <marc.mutz@kdab.com>
-rw-r--r-- | src/corelib/global/qglobal.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 <typename T> 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; }; |