If I use Boost futures and future true reports for has_exception (), is there a way to get this exception? For example, here is the following code:
int do_something() { ... throw some_exception(); ... } ... boost::packaged_task task(do_something); boost::unique_future<int> fi=task.get_future(); boost::thread thread(boost::move(task)); fi.wait(); if (fi.has_exception()) { boost::rethrow_exception(?????); } ...
The question is what should be put instead of "?????"?
source share