I'm on VS2013, with BOOST_COROUTINES_V1 defined. I've merged
boost::coroutine's exception test with boost::exception's
derives_std_exception test. A std::exception& is caught when based on
docs I would expect derives_std_exception to be caught. Am I doing
something obviously wrong?
Thanks, Jeff
#include
#include
struct derives_std_exception : std::exception {};
namespace coro = boost::coroutines;
typedef coro::coroutine< void() > coro_void_void;
template< typename E >
void f14(coro_void_void::caller_type & , E const& e)
{
throw e;
}
int main()
{
try
{
coro_void_void coro( boost::bind(f14< derives_std_exception >
, _1, derives_std_exception()));
return -1;
}
catch (derives_std_exception const&)
{
return 0;
}
catch (std::exception const&)
{
return -1;
}
catch (...)
{
return -1;
}
}