Argument type auto deduction and anonymous lambda functions
No. “Polymorphic lambdas” is what this feature was referred to during the C++ committee discussions, and it was not standardized. The parameter types of a lambda must be specified. You can use decltype though: std::for_each(ints.begin(), ints.end(), [](decltype(*ints.begin())& val){ val = 7; });