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>
This commit is contained in:
parent
d8b678661b
commit
9f96e4f431
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user