3 ms·
Tuples are useful for writing fairly low level features such as marshalling between threads. std::bind is another way, if you need to marshal arguments with a f
by jzwinck 11y ago
Tuples are useful for writing fairly low level features such as marshalling between threads. std::bind is another way, if you need to marshal arguments with a function...but if you don't have a function to call, it's just a tuple.
- eloff 11y agoLambda captures are great for that too, especially since C++14, where you can use move semantics with the captures (e.g. marshal std::unique_ptr)