title: C++11: Why result_of can accept functor type as lvalue_reference, but not function type as lvalue_reference?
body: <p>I've got program below:</p>
  
  <pre><code>#include&lt;type_traits&gt;
  #include&lt;iostream&gt;
  using namespace std;
  template &lt;class F, class R = typename result_of&lt;F()&gt;::type&gt;
  R call(F&amp; f) { return f(); }
  
  struct S {
      double operator()(){return 0.0;}
  };
  int f(){return 1;}
  int main()
  {
      S obj;
      call(obj);//ok
      call(f);//error!
      return 0;
  }
  </code></pre>
  
  <p>It fails to compile in the line of "call(f)".
  It's weird that "call(obj)" is OK.</p>
  
  <p>(1) I've a similar post in another thread <a href="https://stackoverflow.com/questions/38088944/c11-result-of-deducing-my-function-type-failed">C++11 result_of deducing my function type failed</a>. But it doesn't tell why functor objects are OK while functions are not.</p>
  
  <p>(2) I'm not sure if this is related to "R call(F&amp; f)": a function type cannot declare a l-value?</p>
  
  <p>(3) As long as I know, any token with a name, like variable/function, should be considered a l-value. And in the case of function parameter, compiler should "decay" my function name "f" to a function pointer, right? </p>
  
  <p>(4) This is like decaying an array and pass it to a function----And a function pointer could be an l-value, then what's wrong with "call(F&amp; f)"?</p>
  
  <p>Would you help to give some further explanations on "why" is my case, where did I get wrong?
  Thanks.</p>