Namespaces
Variants

std::basic_spanbuf<CharT,Traits>:: swap

From cppreference.net
std::basic_spanbuf
Public member functions
basic_spanbuf::swap
(C++23)
Protected member functions
Non-member functions
void swap ( basic_spanbuf & rhs ) ;
(C++23 이후)

* this rhs 의 상태를 교환합니다.

std:: basic_streambuf < Char, Traits > :: swap ( rhs ) 을 호출하고, * this rhs 의 열기 모드를 교환한 후, 서로의 기반 버퍼를 사용하도록 만듭니다.

목차

매개변수

rhs - another basic_stringbuf

반환값

(없음)

예외

구현 정의 예외를 던질 수 있습니다.

참고 사항

이 함수는 스트림 객체를 교환할 때 자동으로 호출되므로, 직접 호출해야 하는 경우는 거의 없습니다.

예제

참고 항목

basic_spanbuf 객체를 할당
(public member function)
두 개의 basic_ispanstream 객체를 교환
( std::basic_ispanstream<CharT,Traits> 의 public member function)
두 개의 basic_ospanstream 객체를 교환
( std::basic_ospanstream<CharT,Traits> 의 public member function)
두 개의 basic_spanstream 객체를 교환
( std::basic_spanstream<CharT,Traits> 의 public member function)