title: Overloading endl compilation issue in GNU g++ 4.9.2
body: <p>I'm having problem in compilation of the following code snippet while using GNU g++ 4.9.2 (used to compile ok in g++ 2.95.3)</p>
  
  <pre><code>XOStream &amp;operator&lt;&lt;(ostream &amp;(*f)(ostream &amp;))  {
          if(f == std::endl) {
                  *this &lt;&lt; "\n" &lt;&lt; flush;
          }
          else {
                  ostr &lt;&lt; f;
          }
          return(*this);
  }
  </code></pre>
  
  <p>The error is as below:</p>
  
  <pre><code>error: assuming cast to type 'std::basic_ostream&lt;char&gt;&amp; (*)(std::basic_ostream&lt;char&gt;&amp;)' from overloaded function [-fpermissive]
       [exec]    if(f == std::endl) {
       [exec]                 ^
  </code></pre>
  
  <p>Please guide/help.</p>