operator>= (hash_multiset)

如果在运算符的左边hash_multiset对象大于或等于右侧,的hash_multiset测试对象。

bool operator!>=(
   const hash_multiset <Key, Traits, Allocator>& _Left,
   const hash_multiset <Key, Traits, Allocator>& _Right
);

参数

  • _Left
    hash_multiset 类型的对象。

  • _Right
    hash_multiset 类型的对象。

返回值

true,如果在运算符的左边hash_multiset大于或等于hash_multiset列表中的右侧;否则 false

备注

在hash_multiset对象之间的比较根据其元素的比较pairwise。 大于或等于两个对象之间的关系于比较的第一对不相等元素。

在Visual C++ .NET 2003中,<hash_map><hash_set> 标头文件的成员中不再标准,命名空间,而是将stdext命名空间。 有关更多信息,请参见 stdext 命名空间

示例

// hash_multiset_op_ge.cpp
// compile with: /EHsc
#define _DEFINE_DEPRECATED_HASH_CLASSES 0
#include <hash_set>
#include <iostream>

int main( ) 
{
   using namespace std;
   using namespace stdext;
   hash_multiset <int> hs1, hs2, hs3, hs4;
   int i;

   for ( i = 0 ; i < 3 ; i++ )
   {
      hs1.insert ( i );
      hs2.insert ( i * i );
      hs3.insert ( i - 1 );
      hs4.insert ( i );
   }

   if ( hs1 >= hs2 )
      cout << "The hash_multiset hs1 is greater than "
           << "or equal to the hash_multiset hs2." << endl;
   else
      cout << "The hash_multiset hs1 is less than "
           << "the hash_multiset hs2." << endl;

   if ( hs1 >= hs3 )
      cout << "The hash_multiset hs1 is greater than "
           << "or equal to the hash_multiset hs3." << endl;
   else
      cout << "The hash_multiset hs1 is less than "
           << "the hash_multiset hs3." << endl;

   if ( hs1 >= hs4 )
      cout << "The hash_multiset hs1 is greater than "
           << "or equal to the hash_multiset hs4." << endl;
   else
      cout << "The hash_multiset hs1 is less than "
           << "the hash_multiset hs4." << endl;
}
  
  
  

要求

标头: <hash_set>

命名空间: stdext

请参见

参考

标准模板库