boost::future
有一个成员函数:boost::future::then
,而 std::future
没有 std::future::then
。
这篇 精彩的文章 展示了 std::future::then
会有多么有用。
C++17 为什么没有 std::future::then
?
这是因为疏忽还是其他原因呢?
boost::future
有一个成员函数:boost::future::then
,而 std::future
没有 std::future::then
。
这篇 精彩的文章 展示了 std::future::then
会有多么有用。
C++17 为什么没有 std::future::then
?
这是因为疏忽还是其他原因呢?
.then
支持被纳入了在2016年初完成的Concurrency TS中。尽管对于Concurrency TS的实现缺乏实际经验,而且距离C++17需要具备所有功能还剩下很少的时间,所以它没有被添加进去。事实上,由于时间来不及,甚至没有提议将其加入到C++17。