std::deque::emplace

来自cppreference.com
< cpp‎ | container‎ | deque

 
 
 
std :: deque的
成员函数
原文:
Member functions
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
deque::deque
deque::~deque
deque::operator=
deque::assign
deque::get_allocator
元素的访问
原文:
Element access
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
deque::front
deque::back
迭代器
原文:
Iterators
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
deque::begin
deque::cbegin

(C++11)
deque::end
deque::cend

(C++11)
deque::rbegin
deque::crbegin

(C++11)
deque::rend
deque::crend

(C++11)
容量
原文:
Capacity
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
deque::empty
deque::size
deque::max_size
deque::shrink_to_fit
修饰符
原文:
Modifiers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
deque::clear
deque::insert
deque::emplace
deque::erase
deque::push_front
deque::emplace_front
deque::pop_front
deque::push_back
deque::emplace_back
deque::pop_back
deque::resize
deque::swap
 
template< class... Args >
iterator emplace( const_iterator pos, Args&&... args );
(C++11 起)
插入一个新的元素到容器之前,直接pos。该元件是构成在就地,即没有复制或移动操作进行。元素的构造函数调用的参数std::forward<Args>(args)...。元素类型必须是EmplaceConstructible, MoveInsertable and MoveAssignable.
原文:
Inserts a new element into the container directly before pos. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with the arguments std::forward<Args>(args).... The element type must be EmplaceConstructible, MoveInsertable and MoveAssignable.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

All iterators are invalidated. References are invalidated too, unless pos == begin() or pos == end(), in which case they are not invalidated.

目录

[编辑] 参数

pos -
迭代器之前,将兴建新的元素
原文:
iterator before which the new element will be constructed
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
args -
元素的构造函数的参数转发
原文:
arguments to forward to the constructor of the element
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 返回值

布设元素的迭代器,指向.
原文:
Iterator pointing to the emplaced element.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 复杂性

Linear in the lesser of the distances between pos and either of the ends of the container.

[编辑] 例外

如果抛出一个异常(例如,通过构造函数),容器保持不变,如果这个功能是永远不会被调用(强异常保证).
原文:
If an exception is thrown (e.g. by the constructor), the container is left unmodified, as if this function was never called (strong exception guarantee).
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 另请参阅

插入元素
原文:
inserts elements
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]