summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt_p.h2
-rw-r--r--src/corelib/tools/qarraydatapointer.h13
-rw-r--r--src/corelib/tools/qshareddata.h16
3 files changed, 4 insertions, 27 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_winrt_p.h b/src/corelib/kernel/qeventdispatcher_winrt_p.h
index 8b998a7958..2672f11123 100644
--- a/src/corelib/kernel/qeventdispatcher_winrt_p.h
+++ b/src/corelib/kernel/qeventdispatcher_winrt_p.h
@@ -57,7 +57,7 @@
#include <qt_windows.h>
-namespace std { template <typename T> class function; }
+#include <functional>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index 0322615f91..af5173c9ad 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -202,22 +202,11 @@ inline bool operator!=(const QArrayDataPointer<T> &lhs, const QArrayDataPointer<
}
template <class T>
-inline void qSwap(QArrayDataPointer<T> &p1, QArrayDataPointer<T> &p2)
+inline void swap(QArrayDataPointer<T> &p1, QArrayDataPointer<T> &p2)
{
p1.swap(p2);
}
QT_END_NAMESPACE
-namespace std
-{
- template <class T>
- inline void swap(
- QT_PREPEND_NAMESPACE(QArrayDataPointer)<T> &p1,
- QT_PREPEND_NAMESPACE(QArrayDataPointer)<T> &p2)
- {
- p1.swap(p2);
- }
-}
-
#endif // include guard
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index ab54c76720..f123f8e7b9 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -297,25 +297,13 @@ template <class T> inline bool operator==(const QExplicitlySharedDataPointer<T>
}
template <class T>
-Q_INLINE_TEMPLATE void qSwap(QSharedDataPointer<T> &p1, QSharedDataPointer<T> &p2)
+Q_INLINE_TEMPLATE void swap(QSharedDataPointer<T> &p1, QSharedDataPointer<T> &p2)
{ p1.swap(p2); }
template <class T>
-Q_INLINE_TEMPLATE void qSwap(QExplicitlySharedDataPointer<T> &p1, QExplicitlySharedDataPointer<T> &p2)
+Q_INLINE_TEMPLATE void swap(QExplicitlySharedDataPointer<T> &p1, QExplicitlySharedDataPointer<T> &p2)
{ p1.swap(p2); }
-QT_END_NAMESPACE
-namespace std {
- template <class T>
- Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QSharedDataPointer)<T> &p1, QT_PREPEND_NAMESPACE(QSharedDataPointer)<T> &p2)
- { p1.swap(p2); }
-
- template <class T>
- Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer)<T> &p1, QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer)<T> &p2)
- { p1.swap(p2); }
-}
-QT_BEGIN_NAMESPACE
-
template <class T>
Q_INLINE_TEMPLATE uint qHash(const QSharedDataPointer<T> &ptr, uint seed = 0) noexcept
{