Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTypeInfoMerger< T, Ts > Class Template Reference

\inmodule QtCore More...

#include <qtypeinfo.h>

+ Collaboration diagram for QTypeInfoMerger< T, Ts >:

Static Public Attributes

static constexpr bool isComplex = ((QTypeInfo<Ts>::isComplex) || ...)
 
static constexpr bool isRelocatable = ((QTypeInfo<Ts>::isRelocatable) && ...)
 
static constexpr bool isPointer = false
 
static constexpr bool isIntegral = false
 
static constexpr bool isValueInitializationBitwiseZero = false
 

Detailed Description

template<class T, class... Ts>
class QTypeInfoMerger< T, Ts >

\inmodule QtCore

QTypeInfoMerger merges the QTypeInfo flags of T1, T2... and presents them as a QTypeInfo<T> would do.

Let's assume that we have a simple set of structs:

class B {...};
class C {...};
class D {...};
struct A : public B {
C c;
D d;
};

To create a proper QTypeInfo specialization for A struct, we have to check all sub-components; B, C and D, then take the lowest common denominator and call Q_DECLARE_TYPEINFO with the resulting flags. An easier and less fragile approach is to use QTypeInfoMerger, which does that automatically. So struct A would have the following QTypeInfo definition:

Definition at line 99 of file qtypeinfo.h.

Member Data Documentation

◆ isComplex

template<class T , class... Ts>
constexpr bool QTypeInfoMerger< T, Ts >::isComplex = ((QTypeInfo<Ts>::isComplex) || ...)
staticconstexpr

Definition at line 103 of file qtypeinfo.h.

◆ isIntegral

template<class T , class... Ts>
constexpr bool QTypeInfoMerger< T, Ts >::isIntegral = false
staticconstexpr

Definition at line 106 of file qtypeinfo.h.

◆ isPointer

template<class T , class... Ts>
constexpr bool QTypeInfoMerger< T, Ts >::isPointer = false
staticconstexpr

Definition at line 105 of file qtypeinfo.h.

◆ isRelocatable

template<class T , class... Ts>
constexpr bool QTypeInfoMerger< T, Ts >::isRelocatable = ((QTypeInfo<Ts>::isRelocatable) && ...)
staticconstexpr

Definition at line 104 of file qtypeinfo.h.

◆ isValueInitializationBitwiseZero

template<class T , class... Ts>
constexpr bool QTypeInfoMerger< T, Ts >::isValueInitializationBitwiseZero = false
staticconstexpr

Definition at line 107 of file qtypeinfo.h.


The documentation for this class was generated from the following file: