7#include <QtCore/qtconfigmacros.h>
8#include <QtCore/qtdeprecationmarkers.h>
14#pragma qt_class(QtTypeTraits)
15#pragma qt_sync_stop_processing
21#define QT_SUPPORTS_IS_CONSTANT_EVALUATED
22#ifdef __cpp_lib_is_constant_evaluated
23constexpr bool qIsConstantEvaluated() noexcept
25 return std::is_constant_evaluated();
27#elif __has_builtin(__builtin_is_constant_evaluated) || \
28 (defined(Q_CC_MSVC_ONLY) )
29constexpr bool qIsConstantEvaluated() noexcept
31 return __builtin_is_constant_evaluated();
34# undef QT_SUPPORTS_IS_CONSTANT_EVALUATED
38template <
typename Enum>
41 return static_cast<std::underlying_type_t<Enum>
>(
e);
45#if QT_DEPRECATED_SINCE(6, 6)
50constexpr typename
std::add_const<T>::
type &qAsConst(T &
t) noexcept {
return t; }
53void qAsConst(
const T &&) =
delete;
58#ifndef QT_NO_QEXCHANGE
61template <
typename T,
typename U = T>
63noexcept(std::conjunction_v<std::is_nothrow_move_constructible<T>,
64 std::is_nothrow_assignable<T &, U>>)
67 t = std::forward<U>(newValue);
Combined button and popup list for selecting options.
#define QT_DEPRECATED_VERSION_X_6_6(text)
constexpr std::underlying_type_t< Enum > qToUnderlying(Enum e) noexcept
constexpr T qExchange(T &t, U &&newValue) noexcept(std::conjunction_v< std::is_nothrow_move_constructible< T >, std::is_nothrow_assignable< T &, U > >)