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; });

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)