std::allocator<T>:: max_size
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
(until C++20)
|
||||
|
(C++23)
|
||||
|
allocator::max_size
(until C++20)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)
|
|
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 멤버 함수)
|