开发者

C++0x Lambda Support in GCC for the iPhone

开发者 https://www.devze.com 2023-01-07 01:37 出处:网络
Can anyone tell me if C++开发者_StackOverflow中文版 lambda expressions will be supported by GCC for the iPhone in the future?

Can anyone tell me if C++开发者_StackOverflow中文版 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?


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. :-)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号