Array0

public struct Array0<T> : FixedSizeArray
extension Array0 : Equatable where T : Equatable
extension Array0 : Hashable where T : Hashable
extension Array0 : Comparable where Element : Comparable

A fixed sized collection of 0 elements.

  • Undocumented

    Declaration

    Swift

    public init()
  • Creates an instance containing exactly the elements of source.

    Requires: source.isEmpty

    Declaration

    Swift

    @inline(__always)
    public init<Source: Collection>(_ source: Source)
        where Source.Element == Element
  • Creates an instance containing the elements of source except the one at targetPosition.

    Requires: source.indices.contains(targetPosition)

    Declaration

    Swift

    public init(_ source: ArrayN<`Self`>, removingAt targetPosition: Index)
  • Returns a fixed-sized collection containing the same elements as self, with newElement inserted at targetPosition.

    Declaration

    Swift

    public func inserting(_ newElement: Element, at i: Index) -> ArrayN<`Self`>
  • The number of elements in an instance.

    Declaration

    Swift

    public static var count: Int { get }
  • Declaration

    Swift

    public typealias Index = Int
  • Accesses the element at i.

    Declaration

    Swift

    public subscript(i: Index) -> T { get set }
  • The position of the first element.

    Declaration

    Swift

    public var startIndex: Index { get }
  • The position just past the last element.

    Declaration

    Swift

    public var endIndex: Index { get }

Available where Element : Comparable