std::function::assign
template< class F, class Alloc > void assign( F&& f, const Alloc& alloc ); | | (since C++11) (until C++17) |
---|
初始化目标带着f
...alloc
对象的任何内部数据结构分配内存。function
可能会用。
相当于function(allocator_arg, alloc,std::forward<F>(f)).swap(*this)
...
参数
f | - | callable function to initialize the target with |
---|---|---|
alloc | - | allocator to use to allocate memory for the internal data structures |
返回值
%280%29
例外
%280%29
另见
operator= | assigns a new target (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com