title: printf like utility in c++ without format specifier?
body: <p>I am trying to write a function that can convert its argument into a string. However, I am finding it difficult to unpack the parameter pack.</p>
  
  <p>Here is the code that I have written: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  
  template &lt;typename... T&gt;
  std::string StringFormatter(T... values)
  {
      std::ostringstream out;
  
      for (auto&amp;&amp; x : { values... }) {
          out &lt;&lt; x;
      }
  
      return out.str();
  }
  
  int main()
  {
      auto&amp;&amp; i = StringFormatter("One ", "two");  //Success
  
      auto&amp;&amp; j = StringFormatter("one ", 1, "two", 2.0); //Fails
  
      std::cout &lt;&lt; i;
  }
  </code></pre>
  
  <p>I know that the above code is failing because the initializer list accepts only single type arguments. </p>
  
  <p>I have tried a recursive approach to achieve the above implementation, but no luck. </p>
  
  <p>If you can suggest a better way to achieve this, it would be a great help.</p>