命名空间
变体
操作

std::swap(std::basic_stringbuf)

来自 cppreference.cn
< cpp‎ | io‎ | basic stringbuf
 
 
 
 
定义于头文件 <sstream>
template< class CharT, class Traits, class Alloc >

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

           std::basic_stringbuf<CharT,Traits,Alloc>& rhs );
(始于 C++11)
(止于 C++20)
template< class CharT, class Traits, class Alloc >

void swap( std::basic_stringbuf<CharT,Traits,Alloc>& lhs,
           std::basic_stringbuf<CharT,Traits,Alloc>& rhs )

    noexcept(noexcept(lhs.swap(rhs)));
(始于 C++20)

std::swap 算法重载了 std::basic_stringbuf。交换 lhsrhs 的状态。实际调用 lhs.swap(rhs)

目录

[编辑] 参数

lhs, rhs - std::basic_stringbuf 对象,用于交换状态

[编辑] 返回值

(无)

[编辑] 示例

[编辑] 参见

(C++11)
交换两个 basic_stringbuf 对象
(公共成员函数) [编辑]
交换两个对象的值
(函数模板) [编辑]