std::priority_queue::emplace
来自cppreference.com
< cpp | container | priority queue
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
template< class... Args > void emplace( Args&&... args ); |
(C++11 起) | |
Pushes new element to the priority queue. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with exactly the same arguments, as supplied to the function.
Effectively calls c.emplace_back(std::forward<Args>(args)...); std::push_heap(c.begin(), c.end(), comp);
目录 |
[编辑] 参数
args | - | 元素的构造函数的参数转发
原文: arguments to forward to the constructor of the element |
[编辑] 返回值
(无)
[编辑] 复杂性
对数的大小的容器.
原文:
Logarithmic in the size of the container.
[编辑] 另请参阅
inserts element and sorts the underlying container (公共成员函数) | |
删除第一个元素 (公共成员函数) |