views:

66

answers:

1

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?

+2  A: 

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

Marcelo Cantos
I think apple is still on gcc 4.2 for xcode. They've a ways to go.
KitsuneYMG
I agree, they will adopt it for C++, or rather get it with some future GCC update. But blocks are sure there to stay for Objective-C that is not going to have C++1x lambdas ;)
Piotr Kalinowski
That would be cool for cross platform code - in what version does GCC start to support it incidentally?
wb