C++11 Change `auto` Lambda to a different Lambda?
问题 Say I have the following variable containing a lambda: auto a = [] { return true; }; And I want a to return false later on. Could I do something along the lines of this? a = [] { return false; }; This syntax gives me the following errors: binary '=' : no operator found which takes a right-hand operand of type 'main::<lambda_a7185966f92d197a64e4878ceff8af4a>' (or there is no acceptable conversion) IntelliSense: no operator "=" matches these operands operand types are: lambda []bool ()->bool =