another way to fix lambda function issue in gcc4.7