title: Is using increment (operator++) on floats bad style?
body: <p>Is it considered "bad style" to use the increment operator (++) on floats? It compiles just fine but I find it smelly and counter-intuitive.</p>
  
  <p>The question: In what cases is using <code>++</code> on float variable justified and better than <code>+= 1.0f</code>? If there are no use cases, is there a respectable C++ style guide that explicitly says that ++ on float is evil?</p>
  
  <p>For float ++ does not increment by the smallest possble value, but by 1.0. 1.0f has no special meaning (unlike integer 1). It may confuse the reader causing him to think that the variable is int.</p>
  
  <p>For float it is not guaranteed that operator++ changes the argument. For example the following loop is not infinite:</p>
  
  <pre><code>float i, j;
  for (i=0.0, j=1.0; i!=j;i=j++);
  </code></pre>
  
  <p>Consequently doing ++ immediately after -- does not guarantee that the value is unchanged.</p>