diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-10-01 09:29:21 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-10-02 12:47:43 +0200 |
commit | 55689e301c74b2ef20b9283ebb29417ef1657fe2 (patch) | |
tree | b8dbb95f1367e176448fe95a699c33fe5d3cc04b /src/corelib/tools | |
parent | fe360a9d52ad7cdf8819ca84031d6c21e22a33a1 (diff) |
Purge Q_NO_TEMPLATE_FRIENDS and platforms lacking support for them
Given that we rely on C++17, it should be safe to mandate that level of
language support.
Change-Id: If07ccb36bea2a5113a8f5aacf635be7d2590baf7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 0e51990ae3..0db62d9ef4 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -512,13 +512,9 @@ private: qSwap(this->value, other.value); } -#if defined(Q_NO_TEMPLATE_FRIENDS) -public: -#else template <class X> friend class QSharedPointer; template <class X> friend class QWeakPointer; template <class X, class Y> friend QSharedPointer<X> QtSharedPointer::copyAndSetPointer(X * ptr, const QSharedPointer<Y> &src); -#endif void ref() const noexcept { d->weakref.ref(); d->strongref.ref(); } inline void internalSet(Data *o, T *actual) @@ -676,12 +672,8 @@ public: private: friend struct QtPrivate::EnableInternalData; -#if defined(Q_NO_TEMPLATE_FRIENDS) -public: -#else template <class X> friend class QSharedPointer; template <class X> friend class QPointer; -#endif template <class X> inline QWeakPointer &assign(X *ptr) @@ -738,12 +730,8 @@ public: inline QSharedPointer<T> sharedFromThis() { return QSharedPointer<T>(weakPointer); } inline QSharedPointer<const T> sharedFromThis() const { return QSharedPointer<const T>(weakPointer); } -#ifndef Q_NO_TEMPLATE_FRIENDS private: template <class X> friend class QSharedPointer; -#else -public: -#endif template <class X> inline void initializeFromSharedPointer(const QSharedPointer<X> &ptr) const { |