Compartir a través de


multimap::empty

Prueba si un multimap está vacío.

bool empty( ) const;

Valor devuelto

true si el multimap está vacío; false si el multimap no está vacío.

Ejemplo

// multimap_empty.cpp
// compile with: /EHsc
#include <map>
#include <iostream>

int main( )
{
   using namespace std;
   multimap <int, int> m1, m2;

   typedef pair <int, int> Int_Pair;
   m1.insert ( Int_Pair ( 1, 1 ) );

   if ( m1.empty( ) )
      cout << "The multimap m1 is empty." << endl;
   else
      cout << "The multimap m1 is not empty." << endl;

   if ( m2.empty( ) )
      cout << "The multimap m2 is empty." << endl;
   else
      cout << "The multimap m2 is not empty." << endl;
}
  

Requisitos

Encabezado: <map>

Espacio de nombres: std

Vea también

Referencia

multimap (Clase)

Biblioteca de plantillas estándar