title: stringstream >> operator
body: <p>I have this code:</p>
  
  <pre><code>    std::string s = "\n\n\n\n+\n\n\n+";
      std::stringstream serializedDataStream(s);
  
      std::string plusCharacter, plusCharacter2;
      serializedDataStream &gt;&gt; plusCharacter ;
      cout &lt;&lt; "plusCharacter "&lt;&lt;plusCharacter &lt;&lt; "\n";
      serializedDataStream &gt;&gt; plusCharacter2 ;
      cout &lt;&lt; "plusCharacter "&lt;&lt;plusCharacter2;
  
      //OUTPUT:
      //    plusCharacter +
      //    plusCharacter +
  </code></pre>
  
  <p>which means that the <code>stringsteam</code> <code>&gt;&gt;</code> operator skipped new lines. I looked into the <code>std::stringstream</code> documentation but I couldn't find an explanation for why this is happening. Is this a compiler specific behavior, or can I rely on this?</p>