C++ (Qt)class A {...}; class B {...}; A *a = new A;B *b = new B; size_t address_a = reinterpret_cast<size_t>(a); size_t address_b = reinterpret_cast<size_t>(b); if (address_a != address_b) ....else ....
C++ (Qt)inline bool equal (void *a, void *b) { return a == b; } A *a; B *b;if (equal (a, b))
C++ (Qt)A *a; B *b;if (std::equal <void *> (a, b))
C++ (Qt)if ((char *) A == (char *) B))
C++ (Qt)typedef size_t address_type // или typedef void* address_type или typedef char* address_type...virtual address_type address() const = 0;
C++ (Qt)address_type address() const { return reinterpret_cast<address_type>(m_receiver); }
C++ (Qt)bool compare(base_connection2<S_arg1, S_arg2> *bc) const { if ((bc->type() == MEM_FUN_CONNECTION) && (bc->address() == address())) { mem_fun_connection2<S_arg1, S_arg2, R_receiver, R_return, R_arg1, R_arg2> *mfc = dynamic_cast<mem_fun_connection2<S_arg1, S_arg2, R_receiver, R_return, R_arg1, R_arg2> *>(bc); if (m_slot_is_const) return (mfc) ? (mfc->m_slot_pack.m_const_slot == m_slot_pack.m_const_slot) : false; return (mfc) ? (mfc->m_slot_pack.m_slot == m_slot_pack.m_slot) : false; } return false; }
C++ (Qt)if (static_cast <void*> (&a) == &b)