title: thread arguments must be invocable after conversion to rvalues
body: <p>I'm currently trying to learn to use threads and I have a problem with passing arguments to a function executed in another thread.</p>
  <pre class="lang-cpp prettyprint-override"><code>void Class::foo(const string&amp; a, size_t b, Obj&amp; c);
  </code></pre>
  <p>(the thread executing this function is declared inside the class Class)</p>
  <p>for the last agument I use std::ref() as mentioned in the documentation but I still face the same compilation error.</p>
  <p>When I create a test function in the anonymous namespace with the same prototype, the error does not appear.</p>
  <p>Is there a problem with executing a class method in a different thread ? How is it possible to solve the problem ?</p>
  <p>here is the error :</p>
  <pre><code>/usr/include/c++/8/thread:120:17: error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
    static_assert( __is_invocable&lt;typename decay&lt;_Callable&gt;::type,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             typename decay&lt;_Args&gt;::type...&gt;::value,
  </code></pre>
  <p>and the parameters I use to create the thread :</p>
  <pre class="lang-cpp prettyprint-override"><code>(&amp;Class::foo, cref(charSet), b, ref(c))
  </code></pre>