4 ms·
"&" captures references, not copies. I would like it to be just syntactic sugar for "&x, &y, ..." and only include the variables that I actually used in the bod
by abjKT26nO8 6y ago
"&" captures references, not copies. I would like it to be just syntactic sugar for "&x, &y, ..." and only include the variables that I actually used in the body of lambda. There is no performance cost to that (unless a crash is somehow a performance win --- hey, the program finished earlier, I guess it's faster...).
- UncleMeat 6y agoBut the complaint was about lifetimes. You seem to want copies (if I understood your post correctly).