From daaf3b8578294dfa5e51562739acc935a148fa60 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 7 Jan 2015 15:45:15 +0100 Subject: QPair: add member-swap std::pair has it, too. Change-Id: I2526b09455db5502ad38a81f3d401098d54614a5 Reviewed-by: Thiago Macieira --- src/corelib/tools/qpair.qdoc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/corelib/tools/qpair.qdoc') diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc index be329a0df0..f7b3c05db0 100644 --- a/src/corelib/tools/qpair.qdoc +++ b/src/corelib/tools/qpair.qdoc @@ -116,6 +116,31 @@ \sa qMakePair() */ +/*! + \fn void QPair::swap(QPair &other) + \since 5.5 + + Swaps this pair with \a other. + + Equivalent to + \code + qSwap(this->first, other.first); + qSwap(this->second, other.second); + \endcode + + Swap overloads are found in namespace \c std as well as via + argument-dependent lookup (ADL) in \c{T}'s namespace. +*/ + +/*! + \fn void swap(QPair &lhs, QPair &rhs) + \overload + \relates QPair + \since 5.5 + + Swaps \a lhs with \a rhs. +*/ + /*! \fn bool operator==(const QPair &p1, const QPair &p2) \relates QPair -- cgit v1.2.3