title: How to pass an initializer list as a function argument?
body: <p>Basically, I'm looking to do something like this:</p>
  
  <pre><code>HANDLE hThread1 = CreateThread(...);
  HANDLE hThread2 = CreateThread(...);
  HANDLE hThread3 = CreateThread(...);
  
  ...
  
  WaitForMultipleObjects( 3, {hThread1,hThread2,hThread3}, FALSE, INFINITE );
  </code></pre>
  
  <p>instead of this:</p>
  
  <pre><code>HANDLE hThread[3];
  hThread[0] = CreateThread(...);
  hThread[1] = CreateThread(...);
  hThread[2] = CreateThread(...);
  
  ...
  
  WaitForMultipleObjects( 3, hThread, FALSE, INFINITE );
  </code></pre>
  
  <p>The only solution I've found is using <code>std::initializer_list</code>, but obviously <code>WaitForMultipleObjects()</code> doesn't doesn't accept an <code>std::initializer_list</code></p>