title: How do I write a range pipeline that uses temporary containers?
body: <p>I have a third-party function with this signature:</p>
  <pre><code>std::vector&lt;T&gt; f(T t);
  </code></pre>
  <p>I also have an existing potentially infinite range (<a href="https://github.com/ericniebler/range-v3" rel="nofollow noreferrer">of the range-v3 sort</a>) of <code>T</code> named <code>src</code>. I want to create a pipeline that maps <code>f</code> to all elements of that range and flattens all the vectors into a single range with all their elements.</p>
  <p>Instinctively, I would write the following.</p>
  <pre><code> auto rng = src | view::transform(f) | view::join;
  </code></pre>
  <p>However, this <strike>won't work</strike> didn't use to work, because we <strike>cannot</strike> couldn't create views of temporary containers.</p>
  <p><a href="https://godbolt.org/z/EErah7EdW" rel="nofollow noreferrer">UPDATE: This issue has been patched</a> by <a href="https://github.com/ericniebler/range-v3/commit/d800a032132512a54c291ce55a2a43e0460591c7#diff-717d5566d9b53787ef3ff55ab11059b5c63bffc7a1a5c797908654d8d4b084a2" rel="nofollow noreferrer">this commit</a>.</p>
  <p>How does range-v3 support such a range pipeline?</p>