微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

从Swift 4中删除了toUIntMax()和toIntMax()

是什么替换了方法toUIntMax()和Swift 4中的方法toIntMax()?该错误发生在FacebookCore框架内。

任何帮助,将不胜感激

作为 SE-104的一部分,IntMax的概念已被完全删除

Converting from one integer type to another is performed using the concept of the ‘maximum width integer’ (see MaxInt),which is an artificial limitation. The very existence of MaxInt makes it unclear what to do should someone implement Int256,for example.

The proposed model eliminates the ‘largest integer type’ concept prevIoUsly used to interoperate between integer types (see toIntMax in the current model) and instead provides access to machine words. It also introduces the multipliedFullWidth(by:),dividingFullWidth(_:),and quotientAndRemainder methods. Together these changes can be used to provide an efficient implementation of bignums that would be hard to achieve otherwise.

在这种特定情况下,FB SDK应该只使用UInt64($ 0)初始化程序,由于新协议,它现在可用于任何BinaryInteger类型。

原文地址:https://www.jb51.cc/swift/320264.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐