C++0x lambda capture by value always const?

Use mutable.


auto bar = [=] () mutable -> bool ....

Without mutable you are declaring the operator () of the lambda object const.

Leave a Comment