title: Why C++ allows arithmetic or enumeration values to be implicitly converted to boolean?
body: <p>C++ standard says in section 4.12,</p>
  
  <p><em>An rvalue of arithmetic, enumeration, pointer, or pointer to member type can be converted to an rvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false any other value is converted to true.</em></p>
  
  <p>Which means that the following code is valid,</p>
  
  <pre><code>if(5)
    std::cout &lt;&lt; "WOW!";
  </code></pre>
  
  <p>It is syntactically valid but semantically it doesn't make any sense. My question is why C++ is allowing such strange things? AFAIK, it is not making any advantage rather than making confusion. </p>