How can I prevent myself from accessing a lambda captured variable or a parameter after I’m done with it?

· Raymond Chen · Nov. 4, 2021, 2:41 p.m.
Summary
We saw last time that you can have your cake and eat it too: You can have a capturing lambda coroutine provided you copy the captures to the coroutine frame before the coroutine’s first suspension point. From that point onward, you use the copies in the frame instead of the original captured variables, The post How can I prevent myself from accessing a lambda captured variable or a parameter after I’m done with it? appeared first on The Old New Thing....
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →