Attaching Extended Futures

The method then empowers you to attach a future to another future. It often happens that a future will be packed into another future. The job of the unwrapping constructor is to unwrap the outer future.

The proposal N3721

Before I show the first code snippet, I have to say a few words about proposal N3721. Most of this section is from the proposal on “Improvements for std::future and Related APIs”, including my examples. Strangely, the original authors frequently did not use the final get call to get the result from the future. Therefore, I added the res.get call to the examples and saved the result in a variable myResult. Additionally, I fixed a few typos.

Get hands-on with 1200+ tech skills courses.