Fixed exception info bug when boost::exception is derived virtually.

[SVN r46333]
This commit is contained in:
Emil Dotchevski
2008-06-11 18:24:10 +00:00
parent 3b2a6a2711
commit 421a059421
4 changed files with 66 additions and 25 deletions

View File

@ -13,41 +13,60 @@ boost
exception_test
{
inline
some_boost_exception::
some_boost_exception( int x ):
derives_boost_exception::
derives_boost_exception( int x ):
x_(x)
{
}
some_boost_exception::
~some_boost_exception() throw()
derives_boost_exception::
~derives_boost_exception() throw()
{
}
inline
some_std_exception::
some_std_exception( int x ):
derives_boost_exception_virtually::
derives_boost_exception_virtually( int x ):
x_(x)
{
}
some_std_exception::
~some_std_exception() throw()
derives_boost_exception_virtually::
~derives_boost_exception_virtually() throw()
{
}
inline
derives_std_exception::
derives_std_exception( int x ):
x_(x)
{
}
derives_std_exception::
~derives_std_exception() throw()
{
}
template <>
void
throw_test_exception<some_boost_exception>( int x )
throw_test_exception<derives_boost_exception>( int x )
{
boost::throw_exception( some_boost_exception(x) );
boost::throw_exception( derives_boost_exception(x) );
}
template <>
void
throw_test_exception<some_std_exception>( int x )
throw_test_exception<derives_boost_exception_virtually>( int x )
{
boost::throw_exception( some_std_exception(x) );
boost::throw_exception( derives_boost_exception_virtually(x) );
}
template <>
void
throw_test_exception<derives_std_exception>( int x )
{
boost::throw_exception( derives_std_exception(x) );
}
}
}