title: c++ multiple enums in one function argument using bitwise or "|"
body: <p>I recently came across some functions where you can pass multiple enums like this:</p>
  
  <pre><code>myFunction(One | Two);
  </code></pre>
  
  <p>Since I think this is a really elegant way I tried to implement something like that myself:</p>
  
  <pre><code>void myFunction(int _a){
      switch(_a){
          case One:
              cout&lt;&lt;"!!!!"&lt;&lt;endl;
              break;
          case Two:
              cout&lt;&lt;"?????"&lt;&lt;endl;
              break;
      }
  }
  </code></pre>
  
  <p>now if I try to call the function with One | Two, I want that both switch cases get called. I am not really good with binary operators so I dont really know what to do. Any ideas would be great!</p>
  
  <p>Thanks!</p>