title: Why can't I directly push_back update value from function in vector?
body: <p><code>push_back</code>ing to a vector with function updated values doesn't permit why?</p>
  
  <pre><code>std::vector&lt; std::string &gt;goin;
  goin.push_back(function(somestringvalue)); // why cant it take update value?
  
  void function(std::string&amp; var)
  {
      var += "pre";
  }
  </code></pre>