如果两个集合相等,则断言失败。
如果两个集合中的元素相同,而且这些元素的顺序和数量均相同,则这两个集合相等。
Two collections are equal if they have the same elements in the same order and quantity.
如果两个对象的给定数据成员集合的值相同,它们就相等。
Two objects are equal if they have the same value for a given set of their data members.
也许我们认为可以通过定义一个虚函数集合来解决这个问题,这些虚函数可以在类层次中每一层执行相等测试。
We might think we could solve this problem by defining a set of virtual functions that would perform the equality test at each level in the hierarchy.
使用指定的方法对元素的值进行比较,从而验证两个指定的集合是否不相等。
Verifies that two specified collections are not equal, using the specified method to compare the values of elements.
验证两个指定的集合是否不相等。
注意,数值类型遵守数值比较的正常规则。即比较相等的两个数值型对象,只有一个能存在于集合中,例如,1和1.0。
Note that numeric types obey the normal rules for numeric comparison: if two Numbers compare equal (e. g., 1 and 1.0), only one of them can be contained in a set.
实际上,后者允许用户拷贝任何集合来生成一个和期待实现类型相等的集合。
In effect, the latter constructor allows the user to copy any collection, producing an equivalent collection of the desired implementation type.
实际上,后者允许用户拷贝任何集合来生成一个和期待实现类型相等的集合。
In effect, the latter constructor allows the user to copy any collection, producing an equivalent collection of the desired implementation type.
应用推荐