加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-14 05:49:45 所属栏目:百科 来源:网络整理
导读:是什么替换了方法toUIntMax()和Swift 4中的方法toIntMax()?该错误发生在FacebookCore框架内。 任何帮助,将不胜感激 作为 SE-104的一部分,IntMax的概念已被完全删除。 Converting from one integer type to another is performed using the concept of the

是什么替换了方法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类型。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读