OptionSetType
protocol OptionSetType : SetAlgebraType, RawRepresentable
-
Convenience method for iterating over an option set.
The calculation is performed by overflow multiplication
&* 2ofSelf.RawValue(1)as left shift (<<) is only defined for concrete integer types, not theUnsignedIntegerTypethis protocol is defined on.Note
This method was originally detailed on StackOverflow
Declaration
Swift
public func elements() -> AnySequence<Self>Return Value
Any array of options.
View on GitHub
OptionSetType Extension Reference