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 ( ) ;
(jusqu'à C++11)
size_type max_size ( ) const noexcept ;
(depuis C++11)
(obsolète en C++17)
(supprimé en C++20)

Retourne la valeur maximale théoriquement possible de n , pour laquelle l'appel allocate ( n, 0 ) pourrait réussir.

Dans la plupart des implémentations, cela retourne std:: numeric_limits < size_type > :: max ( ) / sizeof ( value_type ) .

Paramètres

(aucun)

Valeur de retour

La taille d'allocation maximale prise en charge.

Voir aussi

[static]
renvoie la taille maximale d'objet supportée par l'allocateur
(fonction membre publique statique de std::allocator_traits<Alloc> )