title: std::stringstream "str" returning nothing?
body: <p>I'm having trouble with <code>std::stringstream</code>. My function as seen below returns absolutely nothing. Even when trying a stringstream outside of the template function it still returns nothing when .str() is called. </p>
  
  <pre><code>template &lt; class T &gt; std::string toString( const T &amp;t )
  {
      std::stringstream temp;
      temp &lt;&lt; t;
      std::cout &lt;&lt; temp.str() &lt;&lt; std::endl;
      return temp.str();
  }
  
  std::string test = "test" + toString( 1 );
  std::cout &lt;&lt; test &lt;&lt; std::endl;
  std::stringstream stream;
  stream &lt;&lt; "test" &lt;&lt; 1;
  std::cout &lt;&lt; stream.str() &lt;&lt; std::endl;
  </code></pre>
  
  <p>Both of these output only "test"</p>
  
  <p><strong>Fixed</strong></p>
  
  <p>Had to remove <code>_GLIBCXX_DEBUG</code> and <code>_GLIBCXX_DEBUG_PEDANTIC</code> from my preprocessor macros.</p>