title: How to create NS_OPTIONS-style bitmask enumerations in Swift?
body: <p>In Apple's documentation about interacting with C APIs, they describe the way <code>NS_ENUM</code>-marked C-style enumerations are imported as Swift enumerations. This makes sense, and since enumerations in Swift are readily provided as the <code>enum</code> value type it's easy to see how to create our own.</p>
  
  <p>Further down, it says this about <code>NS_OPTIONS</code>-marked C-style options:</p>
  
  <blockquote>
    <p>Swift also imports options marked with the <code>NS_OPTIONS</code> macro. Whereas
    options behave similarly to imported enumerations, options can also
    support some bitwise operations, such as <code>&amp;</code>, <code>|</code>, and <code>~</code>. In Objective-C,
    you represent an empty option set with the constant zero (<code>0</code>). In
    Swift, use <code>nil</code> to represent the absence of any options.</p>
  </blockquote>
  
  <p>Given that there isn't an <code>options</code> value type in Swift, how can we create a C-Style options variable to work with?</p>