title: Passing array as argument to std::thread
body: <p>I'm having difficulty passing an array of integers to a function using <code>std::thread</code>. It seems like thread doesn't like the array portion of it. What other way is there to pass an array to a threaded function?</p>
  
  <pre><code>#include &lt;thread&gt;
  #include &lt;ostream&gt;
  using namespace std;
  
  void process(int start_holder[], int size){
    for (int t = 0; t &lt; size; t++){
     cout &lt;&lt; start_holder[t] &lt;&lt; "\n";
    }
  }
  int main (int argc, char *argv[]){
    int size = 5;
    int holder_list[size] = { 16, 2, 77, 40, 12071};
    std::thread run_thread(process,holder_list,size); 
    //std::ref(list) doesnt work either
    //nor does converting the list to std::string then passing by std::ref
    run_thread.join();
  } 
  </code></pre>