StructureSwift5.9.0

    StaticBigInt

    An immutable arbitrary-precision signed integer.

    iOS
    16.4+
    macOS
    13.3+
    tvOS
    16.4+
    watchOS
    9.4+
    @frozen struct StaticBigInt

    StaticBigInt is primarily intended to be used as the associated type of an ExpressibleByIntegerLiteral conformance.

    extension UInt256: ExpressibleByIntegerLiteral {
        public init(integerLiteral value: StaticBigInt) {
            precondition(
                value.signum() >= 0 && value.bitWidth <= 1 + Self.bitWidth,
                "integer overflow: '\(value)' as '\(Self.self)'"
            )
            self.words = Words()
            for wordIndex in 0..<Words.count {
                self.words[wordIndex] = value[wordIndex]
            }
        }
    }

    Citizens in Swift

    Conformances

    Members