std::priority_queue<T,Container,Compare>::operator=
来自 cppreference.cn
< cpp | container | priority queue
priority_queue& operator=( const priority_queue& other ); |
(1) | (隐式声明) |
priority_queue& operator=( priority_queue&& other ); |
(2) | (自 C++11 起) (隐式声明) |
用给定参数的内容替换容器适配器的内容。
1) 复制赋值运算符。用 other 内容的副本替换内容。实际上调用 c = other.c; comp = other.comp;。
2) 移动赋值运算符。使用移动语义用 other 的内容替换内容。实际上调用 c = std::move(other.c); comp = std::move(other.comp);。
内容 |
[编辑] 参数
other | - | 另一个容器适配器,用作源 |
[编辑] 返回值
*this
[编辑] 复杂度
1,2) 等价于底层容器的 operator= 。
[编辑] 示例
本节尚不完整 原因:没有示例 |
[编辑] 参见
构造 priority_queue (公共成员函数) |