说我有以下OptionSetType
struct Modifier : OptionSetType {
typealias RawValue = Int
var rawValue: RawValue = 0
static let Default: Modifier = [.Public, .Package, .Internal]
static let Public = Modifier(rawValue: 1 << 0)
static let Package = Modifier(rawValue: 1 << 1)
static let Protected = Modifier(rawValue: 1 << 2)
static let Internal = Modifier(rawValue: 1 << 3)
static let Private = Modifier(rawValue: 1 << 4)
static let Static = Modifier(rawValue: 1 << 5)
static let Final = Modifier(rawValue: 1 << 6)
init(rawValue: RawValue) {
self.rawValue = rawValue
}
}
我将如何确定 type 的值是否Modifier
包含至少一个包含在 中的元素Modifier.Default
?