<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'template to string'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 00:04:25 GMT</pubDate>
<item>
<title>jeffhung said on 1/24/08</title>
<link>http://snipplr.com/view/1317/template-to-string/</link>
<description><![CDATA[ <p>Why create an extra temporary std::string instance when returning?
Isn't the following good enough?</p>

<pre><code>template <class T> std::string TToStr(const T&amp; t)
{
    std::ostringstream oss;
    oss << t;
    return oss.str();
}
</code></pre>
 ]]></description>
<pubDate>Thu, 24 Jan 2008 02:32:32 GMT</pubDate>
<guid>http://snipplr.com/view/1317/template-to-string/</guid>
</item>
</channel>
</rss>