title: Can you bitwise shift a bool in C++?
body: <p>I'm using someone else's code that was written with an older compiler that mapped a special <code>BOOL</code> type to an <code>unsigned int</code>, but in my compiler it's mapped to a true <code>bool</code>. In some places in his code he uses the bitwise shift operator <code>&lt;&lt;</code> on the <code>bool</code> type, which I had never seen before and my compiler surprised me when it didn't complain.</p>
  
  <p>Is that valid C++? Does the <code>bool</code> automatically get promoted to an <code>int</code> or <code>uint</code>?</p>
  
  <p>I saw <a href="https://stackoverflow.com/questions/24542/using-bitwise-operators-for-booleans-in-c">this related question</a>, which provided some clarity on another issue, but it doesn't address the shift operators.</p>