operators

API Reference

Protocols

protocol Add<RHS>

Defines the + operator for a right-hand operand type.

protocol Subtract<RHS>

Defines the - operator with independent right-hand and result types.

protocol Multiply<RHS>

Defines the * operator with independent right-hand and result types.

protocol Divide<RHS>

Defines the / operator with independent right-hand and result types.

protocol SubscriptRead<I>

Defines value[index] reads for an index type I.

protocol SubscriptWrite<I, T>

Defines value[index] = replacement through an exclusive receiver.

protocol Equatable<RHS = Self>

Defines semantic equality against RHS.

protocol Negatable

Provides unary arithmetic negation and its result type.

protocol BitwiseAnd<RHS>

Provides bitwise AND with a right-hand operand.

protocol BitwiseOr<RHS>

Provides bitwise OR with a right-hand operand.

protocol BitwiseXor<RHS>

Provides bitwise exclusive OR with a right-hand operand.

protocol ShiftLeft<RHS>

Provides a left shift by a right-hand count.

protocol ShiftRight<RHS>

Provides a right shift by a right-hand count.

protocol Complement

Provides unary bitwise complementation.

protocol Not

Provides unary logical negation.

protocol Comparable<RHS>

Defines ordering predicates compatible with a type's equality semantics.