title: misplaced < instead of << in cout in C++
body: <p>This is a follow up question to <a href="https://stackoverflow.com/questions/5665221/typo-with-cout-myint-why-does-it-work/5665324?noredirect=1#comment51650872_5665324">this</a>. In response to my comment <a href="https://stackoverflow.com/users/34509/johannes-schaub-litb">@Johannes Schuab - litb</a> request me to ask this question. </p>
  
  <p>This is the program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main()
  {
      int const income = 0;
      std::cout &lt;&lt; "I'm sorry, your income is: " &lt; income;
  }
  </code></pre>
  
  <p>This is my comment on that post:</p>
  
  <blockquote>
    <p>This will also fail in compilation on g++. How can you say that it
    compiles in GCC? Yes, but the program in ur question compiles fine on
    MSVS 2010.? I am using g++ 4.8.1 &amp; it gives me so many errors when I
    write &lt; instead of &lt;&lt; by mistake. Looks like older GCC allows this,
    but they should give any warnings or strictly compiler errors.</p>
  </blockquote>
  
  <p>I tried it on gcc 5.2.0 &amp; surprisingly it compiles fine. (See live demo here <a href="http://goo.gl/QwGNs9" rel="nofollow noreferrer">http://goo.gl/QwGNs9</a>). I also tried it on clang 3.6. It compiles with warnings. (See live demo <a href="http://goo.gl/WQBYAF" rel="nofollow noreferrer">here</a>). But on my computer I am using Orwell Dev C++ &amp; it uses g++ 4.8.1. When I tried the same program on that compiler, it gives me so many compilation errors. I tried it on g++ 4.9.2 &amp; it still compiles fine giving warning :</p>
  
  <p><code>right operand of comma operator has no effect [-Wunused-value]</code></p>
  
  <p>But when I explicitly compile like following on g++ 4.9.2:</p>
  
  <pre><code>g++ -std=c++11 -o test test.cpp
  
  g++ -std=c++14 -o test test.cpp
  </code></pre>
  
  <p>It gives me too many compilation errors. I also tried it on online C++ compilers that support C++14 (See live demo <a href="http://ideone.com/1tO2hK" rel="nofollow noreferrer">here</a>). But when I compile program in C++03 mode like following on g++ 4.9.2</p>
  
  <pre><code>g++ -std=c++03 -o test test.cpp
  </code></pre>
  
  <p>It compiles fine.</p>
  
  <p>So, my questions are:</p>
  
  <p>1) Why different versions of g++ compilers behave differently when compiling this program? Is this bug in gcc/g++ compilers? </p>
  
  <p>2) Is this C++03 issue that has been fixed in C++11?</p>
  
  <p>3) When I remove the <strong>const</strong> keyword from the program &amp; compile it, program  fails in compilation. Why? Why removing <strong>const</strong> keyword leads to compilation errors?</p>