C++ 11§27.5.4.2/ 21: void swap(basic_ios& rhs); 效果:*this和rhs将被交换的状态,除了它rdbuf()应返回与函数调用之前rhs.rdbuf()返回的值相同的值,并且应返回与函数调用之前返回的值相同的值.
C++ 11§27.5.4.2/ 21:
void swap(basic_ios& rhs);
效果:*this和rhs将被交换的状态,除了它rdbuf()应返回与函数调用之前rhs.rdbuf()返回的值相同的值,并且应返回与函数调用之前返回的值相同的值.
*this
rhs
rdbuf()
rhs.rdbuf()
这部分交换对什么有用?
它会引起麻烦吗?
c++ swap c++11
c++ ×1
c++11 ×1
swap ×1