std::priority_queue<T,Container,Compare>::operator=
来自 cppreference.cn
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);。
目录 |
[编辑] 参数
其他 | - | 另一个用作源的容器适配器 |
[编辑] 返回值
*this
[编辑] 复杂度
1,2) 等同于底层容器的 operator= 的复杂度。
[编辑] 示例
本节不完整 原因:无示例 |
[编辑] 参阅
构造 priority_queue (public member function) |