std::queue::swap
STD::队列::交换
void swap( queue& other ) noexcept(/* see below */ | | (since C++11) |
---|
将容器适配器的内容与other
.有效地打电话using
std::swap
; swap(c, other.c
参数
other | - | container adaptor to exchange the contents with |
---|
返回值
%280%29
例外
In the noexcept expressions below, the identifier swap is looked up in the same manner as the C++17 std::is_nothrow_swappable trait. noexcept specification: noexcept(noexcept(swap(c, other.c))) | (until C++17) |
---|---|
noexcept specification: noexcept(std::is_nothrow_swappable<Container>::value) | (since C++17) |
复杂性
与底层容器%28相同,通常为常数%29。
另见
std::swap(std::queue) | specializes the std::swap algorithm (function template) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。