没有迭代器的映射中的C ++ Access键值对

I need to check if two std::maps contain the same keys and values so I need a way to access the key value pairs of both std::maps. I know that std::maps have the == operator but my std::map contains objects in the value field that don't have a defined == operator. It would also be too difficult to make an == operator for the object because it contains pointers to other objects I would need to define == for.

是否有一种无需迭代器就可以获取键值对的方法,或者是一种更好的方法来尝试执行我正在描述的事情?

评论