在线文档教程
C++
应用 | Utilities

std::swap(std::tuple)

STD::交换%28 std::tuple%29

template< class... Types > void swap( tuple& lhs, tuple& rhs ) noexcept(/* see below */(since C++11)

交换内容lhsrhs相当于lhs.swap(rhs)...

This function does not participate in overload resolution unless std::is_swappable::value is true for all i from 0 to sizeof...(Types).(since C++17)

参数

lhs, rhs-tuples whose contents to swap

返回值

%280%29

例外

noexcept规格:

noexcept(noexcept(lhs.swap(rhs)))

另见

二次

*。

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/实用程序/tuple/swap 2