Sdílet prostřednictvím


hash_multiset::empty

[!POZNÁMKA]

Toto rozhraní API je zastaralé.Alternativou je unordered_multiset – třída.

Zkoušky, pokud hash_multiset je prázdný.

bool empty( ) const;

Vrácená hodnota

true -li hash_multiset je prázdná. false je-li hash_multiset neprázdné.

Poznámky

V aplikaci Visual C++ .NET 2003, členové hlavičkových souborů tříd <hash_map> a <hash_set> již nejsou v oboru názvů std, ale byly přesunuty do oboru názvů stdext.Další informace naleznete v tématu Obor názvů stdext.

Příklad

// hash_multiset_empty.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_multiset <int> hms1, hms2;
   hms1.insert ( 1 );

   if ( hms1.empty( ) )
      cout << "The hash_multiset hms1 is empty." << endl;
   else
      cout << "The hash_multiset hms1 is not empty." << endl;

   if ( hms2.empty( ) )
      cout << "The hash_multiset hms2 is empty." << endl;
   else
      cout << "The hash_multiset hms2 is not empty." << endl;
}
  

Požadavky

Záhlaví:<hash_set>

Obor názvů: stdext

Viz také

Referenční dokumentace

hash_multiset – třída

Standardní knihovna šablon