diff options
Diffstat (limited to 'src/corelib/thread/qfutureinterface.h')
-rw-r--r-- | src/corelib/thread/qfutureinterface.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index 2e15cbb013..047d2eb2d3 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -163,6 +163,8 @@ public: inline bool operator!=(const QFutureInterfaceBase &other) const { return d != other.d; } QFutureInterfaceBase &operator=(const QFutureInterfaceBase &other); + void swap(QFutureInterfaceBase &other) noexcept; + protected: bool refT() const; bool derefT() const; @@ -426,6 +428,12 @@ public: } }; +template<typename T> +inline void swap(QFutureInterface<T> &a, QFutureInterface<T> &b) noexcept +{ + a.swap(b); +} + QT_END_NAMESPACE #endif // QFUTUREINTERFACE_H |