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) |
---|
? cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com