title: You must use infinite loops to efficiently reuse coroutine handles?
body: <p>Given the following coroutine format:</p>
  
  <pre><code>auto myhelper = [&amp;]() -&gt; mytask&lt;int&gt; {
    co_await some_event;
    co_return 5;
  }();
  </code></pre>
  
  <p>Is the following truly the only way to ensure you're not going to get reallocations?</p>
  
  <pre><code>auto myhelper = [&amp;]() -&gt; mytask&lt;int&gt; {
    while (true) {
      co_await some_event;
      co_yield 5;
    }
  }();
  </code></pre>
  
  <p>Because I'm structuring all my coroutines this way, and can't even figure out a decent macro or function means to hide that cumbersome loop, nor the boilerplate in general (ie parenthesis after {}).</p>
  
  <p>I am aware of per-promise_type custom allocators, but consider the overhead to be too high (as size may vary, still requires checking free list, still effectively a reallocation, etc).</p>