43Return visitVariantAssociation(
44 const QV4::Heap::VariantAssociationObject *association,
45 MapCallable &&mapCallable, HashCallable &&hashCallable)
47 switch (association->m_type) {
48 case QV4::Heap::VariantAssociationObject::AssociationType::VariantMap:
50 std::forward<MapCallable>(mapCallable),
51 reinterpret_cast<
const QVariantMap *>(&association->m_variantAssociation));
52 case QV4::Heap::VariantAssociationObject::AssociationType::VariantHash:
54 std::forward<HashCallable>(hashCallable),
55 reinterpret_cast<
const QVariantHash *>(&association->m_variantAssociation));
56 default: Q_UNREACHABLE();
62 QV4::Heap::VariantAssociationObject *association,
63 MapCallable &&mapCallable, HashCallable &&hashCallable)
65 switch (association->m_type) {
66 case QV4::Heap::VariantAssociationObject::AssociationType::VariantMap:
68 std::forward<MapCallable>(mapCallable),
69 reinterpret_cast<QVariantMap *>(&association->m_variantAssociation));
70 case QV4::Heap::VariantAssociationObject::AssociationType::VariantHash:
72 std::forward<HashCallable>(hashCallable),
73 reinterpret_cast<QVariantHash *>(&association->m_variantAssociation));
74 default: Q_UNREACHABLE();