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 ( ) ;
(bis C++11)
size_type max_size ( ) const noexcept ;
(seit C++11)
(veraltet in C++17)
(entfernt in C++20)

Gibt den maximal theoretisch möglichen Wert von n zurück, für den der Aufruf allocate ( n, 0 ) erfolgreich sein könnte.

In den meisten Implementierungen gibt dies std:: numeric_limits < size_type > :: max ( ) / sizeof ( value_type ) zurück.

Parameter

(keine)

Rückgabewert

Die maximal unterstützte Zuordnungsgröße.

Siehe auch

[static]
gibt die maximale Objektgröße zurück, die vom Allokator unterstützt wird
(öffentliche statische Elementfunktion von std::allocator_traits<Alloc> )