title: What's the difference between result_of<F(Args...> and decltype<f(args...)>?
body: <p>I see that <code>std::async</code> is specified as follows:</p>
  
  <pre><code>template &lt;class F, class... Args&gt;                   // copied out of the standard
  future&lt;typename result_of&lt;F(Args...)&gt;::type&gt;
  async(F&amp;&amp; f, Args&amp;&amp;... args);
  </code></pre>
  
  <p>I had expected it to be declared like this:</p>
  
  <pre><code>template &lt;class F, class... Args&gt;
  auto async(F&amp;&amp; f, Args&amp;&amp;... args) -&gt;
    future&lt;decltype(forward&lt;F&gt;(f)(forward&lt;Args&gt;(args)...)&gt;;
  </code></pre>
  
  <p>Would that be equivalent, or is there some way in which the use of <code>result_of</code> is preferable to the use of <code>decltype</code>? (I understand that <code>result_of</code> works with types, while <code>decltype</code> works with expressions.)</p>