title: C++ Is this orthodox using switch case like this?
body: <p>Suppose I have a variable, <code>int x</code>, deciding in a <code>switch/case</code>, and I want two possible actions: one for <code>x=1, x=2, x=5</code> and another for <code>x=3, x=4</code>. Is the following code acceptable in terms of codiquette?</p>
  
  <pre><code>switch (x)
  {
  case 1:
  case 2:
  default:
      // do something
  case 3:
  case 4:
      // do something else
  }
  </code></pre>
  
  <p>I realize it also works for <code>x&gt;5</code>, but that's not a problem in my case, and it seems to work, gcc 6.1.1, archlinux 64. The reason is that <code>do something</code> involves calling a not-so-small function and I'd like to avoid writing it twice (code bloating?), even if it's just a matter of copy-paste.</p>