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 ( ) ;
(C++11 이전)
size_type max_size ( ) const noexcept ;
(C++11 이후)
(C++17에서 사용 중단)
(C++20에서 제거됨)

n 의 이론적으로 가능한 최댓값을 반환하며, 이 값에 대해 allocate ( n, 0 ) 호출이 성공할 수 있습니다.

대부분의 구현에서, 이는 std:: numeric_limits < size_type > :: max ( ) / sizeof ( value_type ) 를 반환합니다.

매개변수

(없음)

반환값

지원되는 최대 할당 크기.

참고 항목

[static]
할당자가 지원하는 최대 객체 크기를 반환합니다
( std::allocator_traits<Alloc> 의 public static 멤버 함수)