title: Is std::async guaranteed to be called for functions returning void?
body: <p>I've wrote the following code to test <code>std::async()</code> on functions returning <code>void</code> with GCC 4.8.2 on Ubuntu.</p>
  
  <pre><code>#include &lt;future&gt;
  #include &lt;iostream&gt;
  
  void functionTBC()
  {
      std::cerr &lt;&lt; "Print here\n";
  }
  
  int main(void)
  {
  #ifdef USE_ASYNC
      auto i = std::async(std::launch::async, functionTBC);
  #else
      auto i = std::async(std::launch::deferred, functionTBC);
  #endif
      //i.get();
      return 0;
  }
  </code></pre>
  
  <p>If <code>i.get();</code> is uncommented, the message <code>"Print here"</code> always exists; however, if <code>i.get();</code> is commented out, <code>"Print here"</code> exists if and only if <code>USE_ASYNC</code> is defined (that is, <code>std::launch::async</code> always leads to message printed out while <code>std::launch::deferred</code> never).</p>
  
  <p>Is this guaranteed behavior? What's the correct way to ensure the asynchronous call returning <code>void</code> to be executed?</p>