Sdílet prostřednictvím


operator>= (multiset) – operátor

Zkoušky, pokud je větší než nebo rovno Multimnožinové objektů na pravé straně Multimnožinové objekt na levé straně operátoru.

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

Parametry

  • _Left
    Objekt typu multiset.

  • _Right
    Objekt typu multiset.

Vrácená hodnota

true Pokud multimnožina na levé straně operátoru je větší než nebo rovno multimnožina na pravé straně seznamu; jinak false.

Poznámky

Srovnání Multimnožinové objektů je založena na porovnání ukládání svých prvků.Větší než nebo rovno vztah mezi dvěma objekty je založena na srovnání prvního páru nestejné prvků.

Příklad

// multiset_op_ge.cpp
// compile with: /EHsc
#include <set>
#include <iostream>

int main( )
{
   using namespace std;
   multiset <int> s1, s2, s3, s4;
   int i;

   for ( i = 0 ; i < 3 ; i++ )
   {
      s1.insert ( i );
      s2.insert ( i * i );
      s3.insert ( i - 1 );
      s4.insert ( i );
   }

   if ( s1 >= s2 )
      cout << "The multiset s1 is greater than "
           << "or equal to the multiset s2." << endl;
   else
      cout << "The multiset s1 is less than "
           << "the multiset s2." << endl;

   if ( s1 >= s3 )
      cout << "The multiset s1 is greater than "
           << "or equal to the multiset s3." << endl;
   else
      cout << "The multiset s1 is less than "
           << "the multiset s3." << endl;

   if ( s1 >= s4 )
      cout << "The multiset s1 is greater than "
           << "or equal to the multiset s4." << endl;
   else
      cout << "The multiset s1 is less than "
           << "the multiset s4." << endl;
}
  

Požadavky

Hlavička: <set>

Obor názvů: std

Viz také

Referenční dokumentace

Standardní knihovna šablon