【问题标题】:Why is there no std::future::then in C++17?为什么 C++17 中没有 std::future::then ?
【发布时间】:2016-12-24 03:57:00
【问题描述】:

boost::future 有一个成员函数:boost::future::then,而std::future 没有std::future::then

这个wonderful article 显示了std::future::then 的用处。

为什么 C++17 中没有 std::future::then

这只是一个疏忽,还是因为其他原因?

【问题讨论】:

标签: c++ multithreading asynchronous standards c++17


【解决方案1】:

.then 支持已被纳入并发 TS,该支持于 2016 年初完成。并发 TS 实现方面的实践经验很少,并且在 C++17 需要完成功能之前几乎没有时间,它没有没有成功。事实上,已经太晚了,他们甚至都懒得提议将它添加到 C++17 中。

【讨论】:

  • 太伤心了,“续写风格”很有用
  • 为什么没有添加到 C++20 中?
猜你喜欢
  • 2019-03-28
  • 2019-05-21
  • 2020-12-31
  • 1970-01-01
  • 2017-03-18
  • 1970-01-01
  • 1970-01-01
  • 2016-03-14
  • 2016-01-09
相关资源
最近更新 更多