std::future::is_readyが無くなった理由

ある時期までの std::future 関数では、std::promise によって値や例外がセットされているかどうかを問い合わせる関数がありました。

しかし現在の C++11 の仕様書では消されています。
なぜ消されたのか気になったので調べてみたところ、以下の文書が見つかりました。

Removal of the is_ready, has_exception, and has_value query functions. The presence of these function requires still other functions in the synchronous case. Evolution Working Group direction is that the complexity in interface is as yet unjustified, and prudence dictates a smaller initial interface.

A Simple Asynchronous Call

is_ready, has_exception, has_value クエリ関数を削除。これらの関数の存在は、synchronous な場合においてさらに別の関数が必要になる。インターフェースが複雑になるのは良くないし、よく考えれば初期の小さなインターフェースになるはずだというのが、Evolution Working Group の方向性である。

ということらしいです。

もし値がセットされているかどうか知りたいなら、

template<typename R>
  bool is_ready(std::future<R>& f)
  { return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; }

のように wait_for を使えばいいようです*1