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

std::forward_list::emplace_after

template< class... Args > iterator emplace_after( const_iterator pos, Args&&... args );

?

(since C++11)

将新元素插入到容器中指定位置之后的位置。元素是就地构造的,即不执行复制或移动操作。调用元素的构造函数的参数与提供给函数的参数完全相同。

没有迭代器或引用无效。

参数

pos

-

iterator after which the new element will be constructed

args

-

arguments to forward to the constructor of the element

返回值

新元素的迭代器。

复杂性

常量。

例外

如果抛出异常%28例如。通过构造函数%29,容器未被修改,就好像该函数从未被调用过%28强异常保证%29一样。

另见

insert_after

inserts elements after an element (public member function)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com