Initializer (Default implementation)swift 6.0.3Swift
init
Creates an empty option set.
init()
This initializer creates an option set with a raw value of zero.
Creates an empty option set.
init()
where Self.RawValue:FixedWidthInteger
This initializer creates an option set with a raw value of zero.
import Swift
protocol OptionSet : RawRepresentable, SetAlgebra
A type that presents a mathematical set interface to a bit set.
protocol FixedWidthInteger : BinaryInteger, LosslessStringConvertible where Self.Magnitude : FixedWidthInteger, Self.Magnitude : UnsignedInteger, Self.Stride : FixedWidthInteger, Self.Stride : SignedInteger
An integer type that uses a fixed size for every instance.
init()
Creates an empty set.
mutating func formIntersection(_ other: Self)
Removes all elements of this option set that are not also present in the given set.
mutating func formSymmetricDifference(_ other: Self)
Replaces this set with a new set containing all elements contained in either this set or the given set, but not in both.
mutating func formUnion(_ other: Self)
Inserts the elements of another set into this option set.