title: Invoking std::thread with pointer to freestanding function
body: <p>I tried to invoke <code>std::thread</code> perfect forwarding constructor (<code>template&lt; class Function, class... Args &gt; explicit thread( Function&amp;&amp; f, Args&amp;&amp;... args );</code>) with a pointer to function (NOT a pointer to <em>member</em> function), as shown in the following M(N)WE:</p>
  
  <pre><code>#include &lt;thread&gt;
  #include &lt;string&gt;
  
  static void foo(std::string query, int &amp; x)
  {
    while(true);
  }
  
  int main() {
   int i = 1;
   auto thd = std::thread(&amp;foo, std::string("bar"), i);
   thd.join();
  }
  </code></pre>
  
  <p>Live demo: <a href="https://godbolt.org/g/Cwi6wd" rel="noreferrer">https://godbolt.org/g/Cwi6wd</a></p>
  
  <p>Why does the code not compile on GCC, Clang and MSVC, complaining about a missing overload of <code>invoke</code> (or similar names)?
  A function argument is a pointer to a function, so it should be a <code>Callable</code>, right?</p>
  
  <p>Please note: I know that using a lambda would solve the problem; I want to understand why the problem arises.</p>