자세한 내용은 실제 documentation에서 확인가능 https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html#//apple_ref/doc/uid/TP40014097-CH27-ID28
Advanced Operators
Bitwise Operators
Bitwise NOT OperatorThe bitwise NOT operator (~
)
Bitwise AND OperatorThe bitwise AND operator (&
)
Bitwise OR Operator The bitwise OR operator (|
)
Bitwise XOR Operator The bitwise XOR operator, or “exclusive OR operator” (^
)
Bitwise Left and Right Shift Operators The bitwise left shift operator (<<
) and bitwise right shift operator (>>
)
Overflow Operators
- Overflow addition (
&+
) - Overflow subtraction (
&-
) - Overflow multiplication (
&*
)
Precedence and Associativity
Operator Methods
Classes and structures can provide their own implementations of existing operators. This is known as overloading the existing operators.