Improved auto boost detect check and added check for lambda function support