如何为BinaryInteger协议实现Words关联类型?

我正在尝试为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]

我不确定这些错误是什么意思或如何纠正它们。任何帮助将不胜感激!

kinlin1900 回答:如何为BinaryInteger协议实现Words关联类型?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2629216.html

大家都在问