V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
谷否 | 三分谷地,为你喜欢
AI 大模型 + 柔性供应链,不仅可以为你测试香水味道,还能一件定制实体香水,快速发货。
Promoted by wuqiwen
georgetso
V2EX  ›  Swift

inout 和 mutating 的区别有哪些?

  •  
  •   georgetso · 2014-08-07 09:08:50 +08:00 · 4414 次点击
    这是一个创建于 3997 天前的主题,其中的信息可能已经有所发展或是发生改变。
    1 条回复    2014-08-07 10:32:41 +08:00
    palxex
        1
    palxex  
       2014-08-07 10:32:41 +08:00
    你应该问共通性在哪里吧。在swift里inout只能用于形参声明,mutating只能用于函数声明,完全没有交集啊。
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1030 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 18:58 · PVG 02:58 · LAX 11:58 · JFK 14:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.