2 ms·
> Now I get C being low level, so perhaps this is better, but I can't really imagine the thing I am cleaning up (as opposed to auxiliary info like an allocator
by lelanthran 5y ago
> Now I get C being low level, so perhaps this is better, but I can't really imagine the thing I am cleaning up (as opposed to auxiliary info like an allocator to deallocate memory with) being captured by value.
I was wondering the same thing; what is the use-case for needing a capture-by-value option at scope exit?
Just make all captures a capture-by-reference and it works for all use-cases.