Non-intrusive exception_ptr support for msvc 7.1/8.0/9.0 (thanks Anthony Williams)

[SVN r65204]
This commit is contained in:
Emil Dotchevski
2010-09-03 02:03:15 +00:00
parent 5dbd4c8f32
commit 3b4cdfce47
7 changed files with 162 additions and 338 deletions

View File

@ -146,6 +146,10 @@ test_std_exception()
#endif
}
catch(
T & )
{
}
catch(
... )
{
BOOST_TEST(false);
@ -216,6 +220,10 @@ test_std_exception_what()
#endif
}
catch(
T & )
{
}
catch(
... )
{
BOOST_TEST(false);
@ -385,6 +393,11 @@ main()
BOOST_TEST(false);
}
catch(
derives_std_exception & )
{
//Yay! Non-intrusive cloning supported!
}
catch(
boost::unknown_exception & e )
{
#ifndef BOOST_NO_RTTI
@ -434,6 +447,14 @@ main()
BOOST_TEST(false);
}
catch(
derives_std_boost_exception & x )
{
//Yay! Non-intrusive cloning supported!
BOOST_TEST(boost::get_error_info<my_info>(x));
if( int const * p=boost::get_error_info<my_info>(x) )
BOOST_TEST(*p==42);
}
catch(
boost::unknown_exception & x )
{
BOOST_TEST(boost::get_error_info<my_info>(x));
@ -495,6 +516,14 @@ main()
BOOST_TEST(false);
}
catch(
derives_boost_exception & x )
{
//Yay! Non-intrusive cloning supported!
BOOST_TEST(boost::get_error_info<my_info>(x));
if( int const * p=boost::get_error_info<my_info>(x) )
BOOST_TEST(*p==42);
}
catch(
boost::unknown_exception & x )
{
BOOST_TEST(boost::get_error_info<my_info>(x));