Use C++ lambda function