title: Template function for applying args to function
body: <p>I trying to write a function (call it <code>apply_args()</code>) that takes a specific function or function object and arguments for calling this object, and calls it using the perfect forwarding.</p>
  
  <p>Example:</p>
  
  <pre><code>auto fun = [](std::string a, std::string const&amp; b) { return a += b; };
  
  std::string s("world!");
  
  // s is passing by lvalue ref,
  // temporary object by rvalue ref 
  s = apply_args(fun, std::string("Hello, "), s);
  </code></pre>
  
  <p>How can I implement that function?</p>