std::priority_queue::top
const_reference top() const; | | |
---|
返回对优先级队列中的top元素的引用。调用时将删除此元素。pop()
如果使用默认比较函数,则返回的元素也是队列中最大的元素。
参数
%280%29
返回值
对top元素的引用,就好像是通过调用c.front()
...
复杂性
常量。
另见
pop | removes the top element (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com