diff options
Diffstat (limited to 'src/corelib/global/qttypetraits.qdoc')
-rw-r--r-- | src/corelib/global/qttypetraits.qdoc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/corelib/global/qttypetraits.qdoc b/src/corelib/global/qttypetraits.qdoc index 44c9ad685c..ed814d6f43 100644 --- a/src/corelib/global/qttypetraits.qdoc +++ b/src/corelib/global/qttypetraits.qdoc @@ -2,6 +2,14 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! + \headerfile <QtTypeTraits> + \inmodule QtCore + \since 6.5 + \title Qt Type Traits + \brief Functionality for type traits and transformations. +*/ + +/*! \fn template <typename Enum> std::underlying_type_t<Enum> qToUnderlying(Enum e) \relates <QtTypeTraits> \since 6.2 @@ -46,6 +54,20 @@ To prevent this construct from compiling (and failing at runtime), qAsConst() has a second, deleted, overload which binds to rvalues. + + \note You can make the qAsConst() function unavailable by defining + the \l{QT_NO_QASCONST} macro. +*/ + +/*! + \macro QT_NO_QASCONST + \since 6.8 + \relates <QtTypeTraits> + + Defining this macro removes the availability of the qAsConst() + function. + + \sa qAsConst */ /*! @@ -71,6 +93,7 @@ only in that it is \c constexpr already before C++20 and noexcept already before C++23. We strongly advise to use std::exchange() when you don't need the C++20 or C++23 variants. + You can make qExchange() unavailable by defining the \l{QT_NO_QEXCHANGE} macro. Here is how to use qExchange() to implement move constructors: \code @@ -110,3 +133,14 @@ long as the loop runs, saving the declaration of a temporary variable. Be aware, though, that qExchange() returns a non-const object, so Qt containers may detach. */ + +/*! + \macro QT_NO_QEXCHANGE + \since 6.6 + \relates <QtTypeTraits> + + Defining this macro removes the availability of the qExchange() + function. + + \sa qExchange +*/ |