public static member function
<memory>
std::allocator_traits::select_on_container_copy_construction
static allocator_type select_on_container_copy_construction (const allocator_type& alloc);
Select on container copy construction
Obtains an allocator to be used on a copy-construction of a container that uses alloc.
In the non-specialized definition of allocator_traits, this member function returnsalloc.select_on_container_copy_construction()if such an expression is well formed. Otherwise, it returns alloc. A specialization for a specific allocator type may provide a different definition.
参数
- alloc
- Allocator object
allocator_typeis an alias of allocator_traits's template parameter.
返回值
The allocator object to be used in the copy-constructed container object.
allocator_typeis an alias of allocator_traits's template parameter.