I need to check if two std::map
s contain the same keys and values so I need a way to access the key value pairs of both std::map
s. I know that std::map
s 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.
是否有一种无需迭代器就可以获取键值对的方法,或者是一种更好的方法来尝试执行我正在描述的事情?