名稱空間
變體
操作

std::shared_future<T>::operator=

來自 cppreference.com
 
 
併發支援庫
執行緒
(C++20)
this_thread 名稱空間
(C++11)
(C++11)
(C++11)
協同取消
互斥
通用鎖管理
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
條件變數
(C++11)
訊號量
門閂和屏障
(C++20)
(C++20)
期值
(C++11)
(C++11)
(C++11)
(C++11)
安全回收
(C++26)
危險指標
原子型別
(C++20)
原子型別的初始化
(C++11)(C++20 中已棄用)
(C++11)(C++20 中已棄用)
記憶體排序
(C++11)(C++26 中已棄用)
原子操作的自由函式
原子標誌的自由函式
 
 
(1)
shared_future& operator=( const shared_future& other );
(C++11 起)
(C++17 前)
shared_future& operator=( const shared_future& other ) noexcept;
(C++17 起)
shared_future& operator=( shared_future&& other ) noexcept;
(2) (C++11 起)

賦值另一個 shared_future 的內容。

1) 釋放任何共享狀態,並將 other 的內容賦值給 *this。賦值後,this->valid() == other.valid()
2) 釋放任何共享狀態,並移動賦值 other 的內容給 *this。賦值後,other.valid() == false,且 this->valid() 將產生與賦值前 other.valid() 相同的值。

[編輯] 引數

其他 - 一個 std::shared_future,它將狀態轉移到 *this

[編輯] 返回值

*this