std::shared_future::operator=

shared_future& operator=( const shared_future& other );
(1) (C++11 起)
shared_future& operator=( shared_future&& other );
(2) (C++11 起)

赋值另一 shared_future 的内容。

1) 释放任何共享状态并赋值 other 的内容给 *this 。赋值后, this->valid() == other.valid()
2) 释放任何共享状态并移动赋值 other 的内容给 *this 。赋值后, other.valid() == falsethis->valid() 将产生与 other.valid() 在赋值前相同的值。

参数

other - 将转移状态给 *thisstd::shared_future

返回值

*this

异常

1) (无)
(C++17 前)
1)
noexcept 规定:  
noexcept
  
(C++17 起)
2)
noexcept 规定:  
noexcept
  

版本历史

  • (当前 | 先前 2017年9月24日 (日) 09:19Fruderica讨论 | 贡献. . (1,035字节) (-995). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:34P12bot讨论 | 贡献 . . (2,030字节) (-142). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 18:46P12bot讨论 | 贡献 . . (2,172字节) (+337). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:32P12讨论 | 贡献 . . (1,835字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (1,835字节) (+1,835). . (Translated from the English version using Google Translate)