Namespaces
Variants

std::allocator<T>:: max_size

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
size_type max_size ( ) const throw ( ) ;
(hasta C++11)
size_type max_size ( ) const noexcept ;
(desde C++11)
(obsoleto en C++17)
(eliminado en C++20)

Devuelve el valor máximo teóricamente posible de n , para el cual la llamada allocate ( n, 0 ) podría tener éxito.

En la mayoría de las implementaciones, esto devuelve std:: numeric_limits < size_type > :: max ( ) / sizeof ( value_type ) .

Parámetros

(ninguno)

Valor de retorno

El tamaño máximo de asignación admitido.

Véase también

[static]
devuelve el tamaño máximo de objeto compatible con el asignador
(función miembro pública estática de std::allocator_traits<Alloc> )