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

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

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -