title: Wait for multiple async tasks to complete
body: <p>I am kicking off several async tasks like so:</p>
  
  <pre><code>for(UINT Id: myIds)
  {
      std::async([=]
      {
          DoSomeStuffUsingId(Id);               
  
          return true;
      });
  }
  </code></pre>
  
  <p>I have a function that needs to know if all these tasks have completed:</p>
  
  <pre><code>void SomeFunction()
  { 
      if (all async tasks have completed)
      {
          do something else
      }
  }
  </code></pre>
  
  <p>I understand that I can wait on an async task like so:</p>
  
  <pre><code>std::future&lt;bool&gt; fut = std::async (do something); 
  fut.wait();
  </code></pre>
  
  <p>And I see from this link <a href="https://stackoverflow.com/questions/19225372/waiting-for-multiple-futures">Waiting for multiple futures?</a> that there is no wait for multiple futures yet.</p>
  
  <p>Is there any trick I can use to see if all my tasks have completed?</p>
  
  <p>Could I store each future in an array or vector and wait on each one in turn?</p>