iPhone 的 GCC 中的 C++0x Lambda 支持

发布于 2024-09-10 03:52:31 字数 117 浏览 1 评论 0原文

谁能告诉我 iPhone 的 GCC 将来是否会支持 C++ lambda 表达式?

显然苹果有他们的自定义“块”支持,所以我想知道这对于将 C++0x 代码移植到 iPhone 平台而言最终意味着什么?

Can anyone tell me if C++ lambda expressions will be supported by GCC for the iPhone in the future?

Obviously Apple have their custom 'block' support so I wondered what this may eventually mean in terms of portable C++0x code to the iPhone platform?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寂寞笑我太脆弱 2024-09-17 03:52:31

除非所有苹果工程师突然同时进入植物人状态,需要成人尿布和24小时护士,是的,将来会支持的。

编译器供应商通常会抢先一步,以自己的特殊方式添加待处理的功能。这并没有阻止他们最终采用新兴标准。在代码块的情况下,语法与 C++1x lambda 正交,可能是故意的,这样当它们采用标准时就不会发生冲突。

(当然,我可能是错的。:-)

Unless all Apple engineers have suddenly and simultaneously entered a vegetative state requiring adult diapers and a 24-hour nurse, yes, it will be supported in the future.

It is common for compiler vendors to jump the gun and add pending features in their own special way. That has never stopped them from eventually adopting emerging standards. In the case of code blocks, the syntax is orthogonal to C++1x lambdas, probably intentionally so, such that there will be no conflict when they adopt the standard.

(Of course, I could be wrong. :-)

随波逐流 2024-09-17 03:52:31

我同意 Apple 块和 C++-0x lambda 在语法上有足够的不同,因此 Apple 实现 lambda 不会有问题。潜在的棘手部分可能是在 Objective-C++0X 中一起解析 lambda capture 和 Objective-C 调度语法;-)。我认为当 lambda 进入时,GCC 中至少考虑到了这一点,但我不认为这个组合在解决问题方面受到了很大的打击。时间会证明一切。

I agree that Apple blocks and C++-0x lambdas are syntactically different enough that there won't be a problem for Apple to implement lambdas. The potentially sticky part might be parsing the lambda capture and objective-C dispatch syntax together in Objective-C++0X ;-). I think this was at least thought of in GCC when lambdas went in but I don't think this combo has been hit very hard to work out problems. Time will tell.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文