Here is my dilemma: I really like lambda and have been using Boost.Fusion and Phoenix a lot lot. They are pretty mature and play nicely across many compilers.
What about the C++11 lambdas? They are really nice and much more easier to use then boost alternatives (no more functors!). Recent ICC and GCC compilers support them. But there are still lots of ICC 9.x and GCC 4.1 and below systems not to mention XL and Sun compilers. Do those compilers offer lambda support?
I tend to think that perhaps I should wait to use C++11 features lest older systems reject the code. What do you think? Wait till older compilers fade away or just do it?
Do you need to be able to compile your code using a compiler that doesn’t support C++11 lambdas?
If so, then you can’t use them (obviously). Otherwise, there’s really not much reason not to use them.
There have been few changes to the specification of lambda expressions in C++11, so there is little risk to using them now. Certainly there will be occasional compiler bugs, but for the most part those are few and far between.
The only major lambda-related feature of which I am aware that is not supported by the latest versions of multiple compilers that support lambda expressions is one that was added last March, which allows captureless lambdas to be implicitly converted to function pointers. Visual C++ 2010 and Intel C++ 11.1 don’t support that (I don’t have a later version of Intel C++ with which to test, sorry). Visual C++ 11 does support the implicit conversion, however.