title: why is there a compiler warning for boolean switch statement?
body: <p>why does the code below produce the warning:
  &quot;warning: switch condition has boolean value&quot;</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
      
      const bool yes = true;
      
      switch (yes) {
          case true: cout &lt;&lt; &quot;sure&quot; &lt;&lt; endl; break;
          case false: cout &lt;&lt; &quot;nope&quot; &lt;&lt; endl;
      }
          
      return 0;
  
  }
  </code></pre>
  <p>do switch statements only take numbers and chars?</p>