我正在尝试为Swift创建一个BigNumber库,该库使用UInt64的数组表示数字。我正在尝试使UBigNumber结构符合BinaryInteger,这意味着我必须具有关联的类型Words
。我是这样实现的:
/// Words type of `UBigNumber`
public typealias Words = [UInt64]
但是后来我最终得到了错误:
'BinaryInteger' requires the types 'UInt64' and 'UInt' be equivalent
有一个小花絮告诉我:
Requirement specified as 'Self.Words.Element' == 'UInt' [with Self = UBigNumber]
我不确定这些错误是什么意思或如何纠正它们。任何帮助将不胜感激!