Created
November 18, 2019 16:29
-
-
Save krzyzanowskim/0fb36d6f0cdcd5bb17330acbf3897fb5 to your computer and use it in GitHub Desktop.
flags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
struct Flags: OptionSet { | |
let rawValue: Int | |
static let one = Flags(rawValue: 1 << 0) | |
static let two = Flags(rawValue: 1 << 1) | |
static let three = Flags(rawValue: 1 << 2) | |
} | |
private(set) var _flags: Flags = [.one, .two] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment