Boost Exception now works with BOOST_NO_RTTI and/or BOOST_NO_TYPEID.

[SVN r48429]
This commit is contained in:
Emil Dotchevski
2008-08-28 23:49:55 +00:00
parent 14765312e2
commit 850b7d9618
20 changed files with 369 additions and 148 deletions

View File

@ -18,6 +18,19 @@ boost
namespace
exception_detail
{
inline
void
copy_boost_exception( exception * a, exception const * b )
{
*a = *b;
}
inline
void
copy_boost_exception( void *, void const * )
{
}
class
clone_base:
public counted_base
@ -64,9 +77,7 @@ boost
clone_impl( T const & x ):
T(x)
{
if( boost::exception * be1=dynamic_cast<boost::exception *>(this) )
if( boost::exception const * be2=dynamic_cast<boost::exception const *>(&x) )
*be1 = *be2;
copy_boost_exception(this,&x);
}
private:
@ -91,9 +102,7 @@ boost
T(x),
count_(0)
{
if( boost::exception * be1=dynamic_cast<boost::exception *>(this) )
if( boost::exception const * be2=dynamic_cast<boost::exception const *>(&x) )
*be1 = *be2;
copy_boost_exception(this,&x);
}
private: