hash_set::empty
Примечание
Этот API устарел.Альтернативой является Класс unordered_set.
Если тесты hash_set пусто.
bool empty( ) const;
Возвращаемое значение
true, если hash_set пустым; false, если hash_set nonempty.
Заметки
В Visual C++ .NET 2003 C, элементы файла заголовка <hash_map> и <hash_set> больше не в пространстве имен std, а перемещается в пространство имен stdext. Дополнительные сведения см. в разделе Пространство имен stdext.
Пример
// hash_set_empty.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_set <int> hs1, hs2;
hs1.insert ( 1 );
if ( hs1.empty( ) )
cout << "The hash_set hs1 is empty." << endl;
else
cout << "The hash_set hs1 is not empty." << endl;
if ( hs2.empty( ) )
cout << "The hash_set hs2 is empty." << endl;
else
cout << "The hash_set hs2 is not empty." << endl;
}
Требования
Заголовок:<hash_set>
Пространство имен: stdext