diff --git a/src/qtpromise/qpromise.h b/src/qtpromise/qpromise.h index 47252f2..a69769a 100644 --- a/src/qtpromise/qpromise.h +++ b/src/qtpromise/qpromise.h @@ -23,6 +23,9 @@ public: template ::count != 1, int>::type = 0> inline QPromiseBase(F resolver); + template + inline QPromiseBase(const QPromise& other); + QPromiseBase(const QPromiseBase& other): m_d(other.m_d) {} QPromiseBase(const QPromise& other): m_d(other.m_d) {} QPromiseBase(QPromiseBase&& other) Q_DECL_NOEXCEPT { swap(other); } @@ -94,6 +97,9 @@ public: // STATIC inline static QPromise resolve(const T& value); inline static QPromise resolve(T&& value); + template + operator QPromise(); + private: friend class QPromiseBase; }; @@ -105,6 +111,9 @@ public: template QPromise(F&& resolver): QPromiseBase(std::forward(resolver)) { } + template + QPromise(const QPromise& other); + public: // STATIC template