Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qttypetraits.h File Reference
#include <QtCore/qtconfigmacros.h>
#include <QtCore/qtdeprecationmarkers.h>
#include <type_traits>
#include <utility>
+ Include dependency graph for qttypetraits.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QtPrivate::type_dependent_false< T >
 
struct  QtPrivate::value_dependent_false< T >
 

Namespaces

namespace  QtPrivate
 \macro QT_NAMESPACE
 

Macros

#define QT_SUPPORTS_IS_CONSTANT_EVALUATED
 

Functions

template<typename Enum >
constexpr std::underlying_type_t< Enum > qToUnderlying (Enum e) noexcept
 
template<typename T , typename U = T>
constexpr T qExchange (T &t, U &&newValue) noexcept(std::conjunction_v< std::is_nothrow_move_constructible< T >, std::is_nothrow_assignable< T &, U > >)
 

Macro Definition Documentation

◆ QT_SUPPORTS_IS_CONSTANT_EVALUATED

#define QT_SUPPORTS_IS_CONSTANT_EVALUATED

Definition at line 21 of file qttypetraits.h.

Function Documentation

◆ qExchange()

template<typename T , typename U = T>
constexpr T qExchange ( T &  t,
U &&  newValue 
)
constexprnoexcept

Definition at line 62 of file qttypetraits.h.

◆ qToUnderlying()

template<typename Enum >
constexpr std::underlying_type_t< Enum > qToUnderlying ( Enum  e)
constexprnoexcept

Definition at line 39 of file qttypetraits.h.

References e.

Referenced by colorRoleOffset(), colorRoleOffset(), operator|(), operator|(), operator|(), and qHash().

+ Here is the caller graph for this function: