Namespaces
Variants

std:: swap (std::basic_stringbuf)

From cppreference.net
定义于头文件 <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 的特化版本。将 lhs 的状态与 rhs 的状态进行交换。实际效果等同于调用 lhs. swap ( rhs )

目录

参数

lhs, rhs - 要交换状态的 std::basic_stringbuf 对象

返回值

(无)

示例

参见

(C++11)
交换两个 basic_stringbuf 对象
(公开成员函数)
交换两个对象的值
(函数模板)