Namespaces
Variants

std::basic_syncbuf<CharT,Traits,Allocator>:: operator=

From cppreference.net
basic_syncbuf & operator = ( basic_syncbuf && other ) ;

먼저, 보류 중인 모든 출력(및 지연된 플러시가 있는 경우)을 래핑된 스트림으로 전송하기 위해 emit() 를 호출합니다.

그런 다음 임시 저장소, 래핑된 스트림 포인터, 정책 및 기타 모든 상태(뮤텍스 포인터 등)를 포함한 모든 내용을 other 에서 이동하여 이동 할당을 수행합니다. 이동 후 other 는 스트림과 연결되지 않으며, other. get_wrapped ( ) == nullptr 입니다. other 의 기본 클래스 std::basic_streambuf 의 put 영역 멤버 포인터는 null임이 보장됩니다. 이동된 other 를 파괴해도 어떠한 출력도 생성되지 않습니다.

만약 std:: allocator_traits < Allocator > :: propagate_on_container_move_assignment :: value false 라면, 할당자는 변경되지 않습니다. 그렇지 않은 경우, 이동 할당 이후 get_allocator ( ) other. get_allocator ( ) 와 같습니다.

목차

매개변수

기타 - 이동할 다른 std::basic_syncbuf

반환값

* this

예제

참고 항목

basic_osyncstream 객체를 할당함
( std::basic_osyncstream<CharT,Traits,Allocator> 의 public 멤버 함수)
basic_syncbuf 객체를 생성함
(public 멤버 함수)
내부 버퍼 전체를 래핑된 streambuf로 원자적으로 전송함
(public 멤버 함수)
두 개의 basic_syncbuf 객체를 교환함
(public 멤버 함수)