diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-30 13:20:05 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-31 11:55:54 +0100 |
| commit | 04549f68abb1393bc8e0e62579417adf985580b5 (patch) | |
| tree | a83b70124bdc5a38ff41c5edd60b02c448f1f312 /src/corelib/tools/qscopedpointer.cpp | |
| parent | 739e7dd1912b1828bd568fd50c0dffaa6550b80a (diff) | |
Make QScopedPointer comparison operators hidden friends
Reduce overload resolution noise.
Fixes: QTBUG-87979
Change-Id: I52f96e016ffaf1b4f2235a05c1175c5af3eebe36
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/tools/qscopedpointer.cpp')
| -rw-r--r-- | src/corelib/tools/qscopedpointer.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 7647916e99e..b0673920714 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -183,21 +183,20 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template <typename T, typename Cleanup> bool operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) - Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer. + Returns \c true if \a lhs and \a rhs refer to the same pointer. */ /*! - \fn template <typename T, typename Cleanup> bool operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) Returns \c true if \a lhs and \a rhs refer to distinct pointers. */ /*! - \fn template <typename T, typename Cleanup> bool operator==(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t) - \relates QScopedPointer + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator==(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t) \since 5.8 Returns \c true if \a lhs refers to \nullptr. @@ -206,8 +205,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template <typename T, typename Cleanup> bool operator==(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs) - \relates QScopedPointer + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator==(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs) \since 5.8 Returns \c true if \a rhs refers to \nullptr. @@ -216,8 +214,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template <typename T, typename Cleanup> bool operator!=(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t) - \relates QScopedPointer + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator!=(const QScopedPointer<T, Cleanup> &lhs, std::nullptr_t) \since 5.8 Returns \c true if \a lhs refers to a valid (i.e. non-null) pointer. @@ -226,8 +223,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template <typename T, typename Cleanup> bool operator!=(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs) - \relates QScopedPointer + \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator!=(std::nullptr_t, const QScopedPointer<T, Cleanup> &rhs) \since 5.8 Returns \c true if \a rhs refers to a valid (i.e. non-null) pointer. @@ -268,8 +264,8 @@ QT_BEGIN_NAMESPACE \sa isNull() */ -/*! \fn template <typename T, typename Cleanup> void QScopedPointer<T, Cleanup>::swap(QScopedPointer<T, Cleanup> &other) - Swap this pointer with \a other. +/*! \fn template <typename T, typename Cleanup> void QScopedPointer<T, Cleanup>::swap(QScopedPointer<T, Cleanup> &lhs, QScopedPointer<T, Cleanup> &rhs) + Swaps \a lhs with \a rhs. */ /*! |
