c++ - Difference between const auto and auto for lambdas -


is there (useful?) difference between:

auto test = [..](..){..}; 

and

const auto test = [..](..){..}; 

?

yes, if lambda declared mutable cannot call in second case.

int x = 0; const auto test = [x]() mutable { ++x; }; test();  // error 

Comments

Popular posts from this blog

mysql - How to unscape text from database in android studio -

php - Admin SDK -- get information about the group -

Making CSS Drop Down Menu 2 Columns -