CppDS.com

C++ 98 11 14 17 20 手册

std::swap(std::basic_istringstream)

来自cppreference.com

template< class CharT, class Traits, class Alloc >

void swap( std::basic_istringstream<CharT,Traits,Alloc>& lhs,

           std::basic_istringstream<CharT,Traits,Alloc>& rhs );

std::basic_istringstream 特化 std::swap 算法。交换 lhsrhs 的状态。等效地调用 lhs.swap(rhs)

参数

lhs, rhs - 要交换状态的流

返回值

(无)

异常

(无)

示例

参阅

(C++11)
交换两个字符串流
(公开成员函数)
关闭