QTypeInfo Class
template <typename T> class QTypeInfo
The QTypeInfo class describes how a type may be stored by a container. More…
| Header | #include <QTypeInfo> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
List of all members, including inherited members
Detailed Description
The enumerators say whether values of the type T need their constructors and destructors (isComplex), may be moved in memory with memcpy() (isRelocatable), and what kind of type it is (isPointer, isIntegral). A program states these for a type of its own with Q_DECLARE_TYPEINFO():
struct Point3D { int x, y, z; };
Q_DECLARE_TYPEINFO(Point3D, Q_PRIMITIVE_TYPE);
Differences from Qt
The containers of Nt are built on the standard library and do not read QTypeInfo; it exists so that code that declares or reads it compiles. There is no isValueInitializationBitwiseZero.