title: An error occur when using a thread variadic template constractor
body: <pre><code>void f(vector&lt;int&gt;&amp; v){
      for(const auto&amp; x:v) cout &lt;&lt; x;
  }
  
  class F{
  private:
      vector&lt;int&gt; v;
  public:
      F(vector&lt;int&gt;&amp; vc):v{vc}{}
      void operator()(){
          for(const auto&amp; x:v) cout &lt;&lt; x;
      }
  };
  
  int main()
  {
      vector&lt;int&gt; some_vec{3,5,77,32,1};
      vector&lt;int&gt; vec{66,8,90,45,777};
      thread t1{f,some_vec};
      thread t2{F(vec)};
      t1.join();
      t2.join();
      cout &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>An error "no type named 'type' in 'class std::result_of&lt; void (*(std::vector))(std::vector&amp;)>' occur</p>
  
  <p>If the argument vector in <code>f</code> is declared as <code>const</code>, <code>void f(const vector&lt;int&gt;&amp; v)</code>, the error disappears. </p>
  
  <p>On the other hand, the code with function object <code>F</code> works just fine. </p>
  
  <p>Code from Bjarne Stroustrup -- the C++ programming language 5.3.2 Passing Arguments</p>