std::promise::get_future

std::future<T> get_future();
(C++11 起)

返回与 *this 关联同一状态的 future 对象。

*this 无共享状态,或已调用 get_future 则抛出异常。为获取 promise-future 交流通道的多个“弹”端,可使用 std::future::share

参数

(无)

返回值

指代 *this 的共享状态的 future 。

异常

遇到下列条件时抛出 std::future_error

版本历史

  • (当前 | 先前 2017年9月25日 (一) 00:55Fruderica讨论 | 贡献. . (856字节) (-830). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:33P12bot讨论 | 贡献 . . (1,686字节) (+2). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 19:17P12bot讨论 | 贡献 . . (1,684字节) (+297). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:08P12讨论 | 贡献 . . (1,387字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (1,387字节) (+1,387). . (Translated from the English version using Google Translate)