Qt 6.x
The Qt SDK
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;
};
n varying highp vec2 A
const GLubyte * c

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:

template<> class QTypeInfo<A> : public QTypeInfoMerger<A, B, C, D> {};
\inmodule QtCore
Definition qtypeinfo.h:92

Definition at line 91 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 95 of file qtypeinfo.h.

◆ isIntegral

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

Definition at line 98 of file qtypeinfo.h.

◆ isPointer

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

Definition at line 97 of file qtypeinfo.h.

◆ isRelocatable

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

Definition at line 96 of file qtypeinfo.h.

◆ isValueInitializationBitwiseZero

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

Definition at line 99 of file qtypeinfo.h.


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