Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's part of why the capture list is explicit in C++. Automatic by-reference captures should only be used for lambdas whose scope is strictly lexical (ie, passed down the call stack, aka "downward funargs"). Otherwise stick with by-value captures.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: