
Le 28/06/12 22:16, Emil Dotchevski a écrit :
On Thu, Jun 28, 2012 at 10:42 AM, Brian Wood<woodbrian77@gmail.com> wrote:
I haven't found much on use cases in single threaded programs. Do you have any links? I did find the following comment in some code that uses exception_ptr.
Any time when a failure can't be handled at the time it is reported, which usually involves asynchronous operations, which usually involves multiple threads.
"The reason here is that construction/destruction of an exception_ptr are not "cheap""
Calling boost::throw_exception doesn't construct or destruct exception_ptr objects. Any use of boost::exception_ptr requires #including <boost/exception_ptr.hpp>.
Does the use of BOOST_THROW_EXCEPTION implies the use of exception_ptr? Best, Vicente