Namespaces
Variants

std::promise<R>:: operator=

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
promise & operator = ( promise && other ) noexcept ;
(1) (C++11부터)
promise & operator = ( const promise & rhs ) = delete ;
(2) (C++11부터)

내용을 할당합니다.

1) 이동 할당 연산자. 먼저 공유 상태를 포기하고(마치 ~promise() 에서처럼), 그런 다음 other 의 공유 상태를 다음과 같이 실행하는 것처럼 할당합니다: std:: promise ( std :: move ( other ) ) . swap ( * this ) .
2) promise 는 복사 할당이 불가능합니다.

매개변수

other - 상태를 획득할 다른 promise

반환값

* this