4 ms·
> Why does this even exist? When you use `std::bind` or `std::thread`, the arguments you pass are captured and stored by value. What if you want it to be captu
by netheril96 9y ago
> Why does this even exist?
When you use `std::bind` or `std::thread`, the arguments you pass are captured and stored by value. What if you want it to be captured as reference? You use a `std::reference_warpper` instead. Note you cannot use a pointer here because the type won't match, while `reference_wrapper` implicitly converts.