首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::allocator_traits::select_on_container_copy_construction

Defined in header <memory>

?

?

static Alloc select_on_container_copy_construction( const Alloc& a );

?

(since C++11)

如果可能,获取分配程序的副本构造版本。a,通过打电话a.select_on_container_copy_construction()如果上述情况不可能,则为%28例如。a没有成员函数select_on_container_copy_construction(),然后返回a,未经修饰。

此函数由所有标准库容器的副本构造函数调用。它允许构造函数%27s参数使用的分配器注意到容器正在被复制,并在必要时修改状态。

参数

a

-

allocator used by a standard container passed as an argument to a container copy constructor

返回值

由复制的标准容器使用的分配器。

另见

select_on_container_copy_construction

copies the state of scoped_allocator_adaptor and all its allocators (public member function of std::scoped_allocator_adaptor)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com