Namespaces
Variants

std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: 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)
定义于头文件 <scoped_allocator>
size_type max_size ( ) const ;
(C++11 起)

报告外部分配器支持的最大分配大小,通过调用 std:: allocator_traits < OuterAlloc > :: max_size ( outer_allocator ( ) )

参数

(无)

返回值

OuterAlloc 的最大分配大小。

参见

(C++20 前)
返回支持的最大分配大小
( std::allocator<T> 的公开成员函数)
[静态]
返回分配器支持的最大对象大小
( std::allocator_traits<Alloc> 的公开静态成员函数)