title: How to use std::transform with container without push_back?
body: <p>I have a container that has no <code>push_back()</code> method. But this container has an iterator on <code>begin()</code>and <code>end()</code>.</p>
  
  <p>I would like to use <code>std::transform()</code> to output into that container. But <code>std::back_inserter</code> needs to call <code>push_back()</code> on the output container.</p>
  
  <p>Is it possible to use <code>std::transform()</code> to output into a container that just supports direct assignment? Like:</p>
  
  <pre><code>for (auto item : containerNoPushBack)
  {
      item = calculateValue();
  }
  </code></pre>
  
  <p>Or indexed assignment like:</p>
  
  <pre><code>for (size_t i = 0; i &lt; containerNoPushBack.size(); ++i)
  {
      item[i] = calculateValue();
  }
  </code></pre>