Operator: ==

operator == { associativity precedence }

Declarations

func ==(_: Int, rhs: Int)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: Int, rhs: Int) -> Bool
func ==(_: Int8, rhs: Int8)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: Int8, rhs: Int8) -> Bool
func ==(_: Int16, rhs: Int16)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: Int16, rhs: Int16) -> Bool
func ==(_: Int32, rhs: Int32)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: Int32, rhs: Int32) -> Bool
func ==(_: Int64, rhs: Int64)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: Int64, rhs: Int64) -> Bool
func ==(_: UInt, rhs: UInt)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: UInt, rhs: UInt) -> Bool
func ==(_: UInt8, rhs: UInt8)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: UInt8, rhs: UInt8) -> Bool
func ==(_: UInt16, rhs: UInt16)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: UInt16, rhs: UInt16) -> Bool
func ==(_: UInt32, rhs: UInt32)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: UInt32, rhs: UInt32) -> Bool
func ==(_: UInt64, rhs: UInt64)

Returns a Boolean value that indicates whether the two arguments have equal values.

See Also: Equatable, Comparable

Declaration

func ==(lhs: UInt64, rhs: UInt64) -> Bool
func ==(_: UnsafeMutableRawPointer, rhs: UnsafeMutableRawPointer)

Note: This may be more efficient than Strideable's implementation calling UnsafeMutableRawPointer.distance().

Declaration

func ==(lhs: UnsafeMutableRawPointer, rhs: UnsafeMutableRawPointer) -> Bool
func ==(_: UnsafeRawPointer, rhs: UnsafeRawPointer)

Note: This may be more efficient than Strideable's implementation calling UnsafeRawPointer.distance().

Declaration

func ==(lhs: UnsafeRawPointer, rhs: UnsafeRawPointer) -> Bool
func ==(_: Any.Type?, t1: Any.Type?)

Returns true iff t0 is identical to t1; i.e. if they are both nil or they both represent the same type.

Declaration

func ==(t0: Any.Type?, t1: Any.Type?) -> Bool
func == <A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable, F : Equatable>(_: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F))

Returns a Boolean value indicating whether the corresponding components of two tuples are equal.

For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 6 components:

let a = ("a", 1, 2, 3, 4, 5)
let b = ("a", 1, 2, 3, 4, 5)
print(a == b)
// Prints "true"

let c = ("a", 1, 2, 3, 4, 6)
print(a == c)
// Prints "false"

Parameters: lhs: A tuple of Equatable elements. rhs: Another tuple of elements of the same type as lhs.

Declaration

func ==<A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable, F : Equatable>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool
func == <A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable>(_: (A, B, C, D, E), rhs: (A, B, C, D, E))

Returns a Boolean value indicating whether the corresponding components of two tuples are equal.

For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 5 components:

let a = ("a", 1, 2, 3, 4)
let b = ("a", 1, 2, 3, 4)
print(a == b)
// Prints "true"

let c = ("a", 1, 2, 3, 5)
print(a == c)
// Prints "false"

Parameters: lhs: A tuple of Equatable elements. rhs: Another tuple of elements of the same type as lhs.

Declaration

func ==<A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool
func == <A : Equatable, B : Equatable, C : Equatable, D : Equatable>(_: (A, B, C, D), rhs: (A, B, C, D))

Returns a Boolean value indicating whether the corresponding components of two tuples are equal.

For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 4 components:

let a = ("a", 1, 2, 3)
let b = ("a", 1, 2, 3)
print(a == b)
// Prints "true"

let c = ("a", 1, 2, 4)
print(a == c)
// Prints "false"

Parameters: lhs: A tuple of Equatable elements. rhs: Another tuple of elements of the same type as lhs.

Declaration

func ==<A : Equatable, B : Equatable, C : Equatable, D : Equatable>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool
func == <A : Equatable, B : Equatable, C : Equatable>(_: (A, B, C), rhs: (A, B, C))

Returns a Boolean value indicating whether the corresponding components of two tuples are equal.

For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 3 components:

let a = ("a", 1, 2)
let b = ("a", 1, 2)
print(a == b)
// Prints "true"

let c = ("a", 1, 3)
print(a == c)
// Prints "false"

Parameters: lhs: A tuple of Equatable elements. rhs: Another tuple of elements of the same type as lhs.

Declaration

func ==<A : Equatable, B : Equatable, C : Equatable>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool
func == <A : Equatable, B : Equatable>(_: (A, B), rhs: (A, B))

Returns a Boolean value indicating whether the corresponding components of two tuples are equal.

For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 2 components:

let a = ("a", 1)
let b = ("a", 1)
print(a == b)
// Prints "true"

let c = ("a", 2)
print(a == c)
// Prints "false"

Parameters: lhs: A tuple of Equatable elements. rhs: Another tuple of elements of the same type as lhs.

Declaration

func ==<A : Equatable, B : Equatable>(lhs: (A, B), rhs: (A, B)) -> Bool
func == <Element : Equatable>(_: [Element], rhs: [Element])

Returns true if these arrays contain the same elements.

Declaration

func ==<Element : Equatable>(lhs: [Element], rhs: [Element]) -> Bool
func == <Element : Equatable>(_: ArraySlice<Element>, rhs: ArraySlice<Element>)

Returns true if these arrays contain the same elements.

Declaration

func ==<Element : Equatable>(lhs: ArraySlice<Element>, rhs: ArraySlice<Element>) -> Bool
func == <Element : Equatable>(_: ContiguousArray<Element>, rhs: ContiguousArray<Element>)

Returns true if these arrays contain the same elements.

Declaration

func ==<Element : Equatable>(lhs: ContiguousArray<Element>, rhs: ContiguousArray<Element>) -> Bool
func == <Header, Element>(_: ManagedBufferPointer<Header, Element>, rhs: ManagedBufferPointer<Header, Element>)

Declaration

func ==<Header, Element>(lhs: ManagedBufferPointer<Header, Element>, rhs: ManagedBufferPointer<Header, Element>) -> Bool
func == <Pointee>(_: AutoreleasingUnsafeMutablePointer<Pointee>, rhs: AutoreleasingUnsafeMutablePointer<Pointee>)

Declaration

func ==<Pointee>(lhs: AutoreleasingUnsafeMutablePointer<Pointee>, rhs: AutoreleasingUnsafeMutablePointer<Pointee>) -> Bool
func == <Pointee>(_: UnsafeMutablePointer<Pointee>, rhs: UnsafeMutablePointer<Pointee>)

Note: Strideable's implementation is potentially less efficient and cannot handle misaligned pointers.

Declaration

func ==<Pointee>(lhs: UnsafeMutablePointer<Pointee>, rhs: UnsafeMutablePointer<Pointee>) -> Bool
func == <Pointee>(_: UnsafePointer<Pointee>, rhs: UnsafePointer<Pointee>)

Note: Strideable's implementation is potentially less efficient and cannot handle misaligned pointers.

Declaration

func ==<Pointee>(lhs: UnsafePointer<Pointee>, rhs: UnsafePointer<Pointee>) -> Bool
func == <T : Equatable>(_: T?, rhs: T?)

Declaration

func ==<T : Equatable>(lhs: T?, rhs: T?) -> Bool
func == <T : FloatingPoint>(_: T, rhs: T)

Declaration

func ==<T : FloatingPoint>(lhs: T, rhs: T) -> Bool
func == <T : RawRepresentable where T.RawValue : Equatable>(_: T, rhs: T)

Returns a Boolean value indicating whether the two arguments are equal.

Parameters: lhs: A raw-representable instance. rhs: A second raw-representable instance.

Declaration

func ==<T : RawRepresentable where T.RawValue : Equatable>(lhs: T, rhs: T) -> Bool
func == <T : Strideable>(_: T, y: T)

Declaration

func ==<T : Strideable>(x: T, y: T) -> Bool
func == <T>(_: _OptionalNilComparisonType, rhs: T?)

Declaration

func ==<T>(lhs: _OptionalNilComparisonType, rhs: T?) -> Bool
func == <T>(_: T?, rhs: _OptionalNilComparisonType)

Declaration

func ==<T>(lhs: T?, rhs: _OptionalNilComparisonType) -> Bool
func == <Value, Element>(_: _HeapBuffer<Value, Element>, rhs: _HeapBuffer<Value, Element>)

Declaration

func ==<Value, Element>(lhs: _HeapBuffer<Value, Element>, rhs: _HeapBuffer<Value, Element>) -> Bool