title: Deducing a function pointer return type
body: <p>I think code will better illustrate my need:</p>
  
  <pre><code>template &lt;typename F&gt;
  struct return_type
  {
    typedef ??? type;
  };
  </code></pre>
  
  <p>so that:</p>
  
  <pre><code>return_type&lt;int(*)()&gt;::type -&gt; int
  return_type&lt;void(*)(int,int)&gt;::type -&gt; void
  </code></pre>
  
  <p>I know of <code>decltype</code> and <code>result_of</code> but they need to have arguments passed. I want to deduce the return type of a function pointer from a single template parameter. I cannot add the return type as a parameter, because that's exactly what I want to hide here...</p>
  
  <p>I know there's a solution in boost, but I can't use it, and an attempt to dig it out from boost resulted in a spectacular failure (as it often does).</p>
  
  <p>C++11 solutions welcome (as long as supported in VS2012).</p>