首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

operators (std::multiset)

template< class Key, class Compare, class Alloc > bool operator==( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(1)

template< class Key, class Compare, class Alloc > bool operator!=( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(2)

template< class Key, class Compare, class Alloc > bool operator<( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(3)

template< class Key, class Compare, class Alloc > bool operator<=( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(4)

template< class Key, class Compare, class Alloc > bool operator>( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(5)

template< class Key, class Compare, class Alloc > bool operator>=( const multiset<Key,Compare,Alloc>& lhs, const multiset<Key,Compare,Alloc>& rhs );

(6)

比较两个容器的内容。

1-2%29检查lhsrhs是平等的,也就是说,无论lhs.size() == rhs.size()每一个元素lhs中的元素相等。rhs在同一位置。

3-6%29比较lhsrhs按字典顺序。比较由一个相当于std::lexicographical_compare...

参数

lhs, rhs

-

containers whose contents to compare

密钥必须满足“公平比较”的要求,才能使用过载%281-2%29。

返回值

1%29true如果容器的内容相等,false不然的话

2%29true如果容器的内容不相等,false不然的话

3%29true如果lhs按字典顺序再少点比…的内容rhs,,,false不然的话

4%29true如果lhs按字典顺序比或平等...的内容rhs,,,false不然的话

5%29true如果lhs按字典顺序更大比…的内容rhs,,,false不然的话

6%29true如果lhs按字典顺序更大比或平等...的内容rhs,,,false不然的话

复杂性

容器的大小成线性。

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券