Compartir a través de


list::max_size

Devuelve la longitud máxima de una lista.

size_type max_size( ) const;

Valor devuelto

Longitud máxima posible de la lista.

Ejemplo

// list_max_size.cpp
// compile with: /EHsc
#include <list>
#include <iostream>

int main( ) 
{
   using namespace std;
   list <int> c1;
   list <int>::size_type i;

   i = c1.max_size( );
   cout << "Maximum possible length of the list is " << i << "." << endl;
}

Resultados del ejemplo

El siguiente resultado corresponde a x86.

Maximum possible length of the list is 1073741823.

Requisitos

Encabezado: <list>

Espacio de nombres: std

Vea también

Referencia

list (Clase)

Biblioteca de plantillas estándar