Daily bit(e) of C++ | std::packaged_task
Daily bit(e) of C++ #269, The C++11 callable wrapper with a built-in promise: std::packaged_task.
The std::packaged_task is a C++11 callable wrapper, similar to std::function, providing direct access to a std::future.
The std::packaged_task provides a more natural and simpler workflow than manually setting up and passing through a std::promise.
Question: why do you need to enclose that first assignment (auto c= ... ) in an extra set of curly braces?