diff options
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r-- | src/corelib/tools/qsharedpointer.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 72976637d5..3b86eb238b 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -67,8 +67,10 @@ public: // constructors QSharedPointer(); - explicit QSharedPointer(T *ptr); - QSharedPointer(T *ptr, Deleter d); + template <typename X> explicit QSharedPointer(X *ptr); + template <typename X, typename Deleter> QSharedPointer(X *ptr, Deleter d); + QSharedPointer(std::nullptr_t); + template <typename Deleter> QSharedPointer(std::nullptr_t, Deleter d); QSharedPointer(const QSharedPointer<T> &other); QSharedPointer(const QWeakPointer<T> &other); @@ -147,6 +149,14 @@ template<class T, class X> bool operator==(const QWeakPointer<T> &ptr1, const QS template<class T, class X> bool operator!=(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2); template<class T, class X> bool operator==(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2); template<class T, class X> bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2); +template<class T> bool operator==(const QSharedPointer<T> &lhs, std::nullptr_t); +template<class T> bool operator!=(const QSharedPointer<T> &lhs, std::nullptr_t); +template<class T> bool operator==(std::nullptr_t, const QSharedPointer<T> &rhs); +template<class T> bool operator!=(std::nullptr_t, const QSharedPointer<T> &rhs); +template<class T> bool operator==(const QWeakPointer<T> &lhs, std::nullptr_t); +template<class T> bool operator!=(const QWeakPointer<T> &lhs, std::nullptr_t); +template<class T> bool operator==(std::nullptr_t, const QWeakPointer<T> &rhs); +template<class T> bool operator!=(std::nullptr_t, const QWeakPointer<T> &rhs); template <class X, class T> QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &other); template <class X, class T> QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &other); |