命名空间
变体
操作

std::queue<T,Container>::operator=

来自 cppreference.cn
< cpp‎ | container‎ | queue
queue& operator=( const queue& other );
(1) (隐式声明)
queue& operator=( queue&& other );
(2) (自 C++11 起)
(隐式声明)

将容器适配器的内容替换为给定参数的内容。

1) 复制赋值运算符。用 other 内容的副本替换内容。实际调用 c = other.c;
2) 移动赋值运算符。使用移动语义用 other 的内容替换内容。实际调用 c = std::move(other.c);

内容

[编辑] 参数

other - 要用作来源的另一个容器适配器

[编辑] 返回值

*this

[编辑] 复杂度

1,2) 等同于底层容器的 operator= 的复杂度。

[编辑] 示例

[编辑] 参见

构造 queue
(公开成员函数) [编辑]