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

@ -64,6 +64,9 @@ boost
clone_impl( T const & x ):
T(x)
{
if( boost::exception * be1=dynamic_cast<boost::exception *>(this) )
if( boost::exception const * be2=dynamic_cast<T const *>(&x) )
*be1 = *be2;
}
private:
@ -88,6 +91,9 @@ boost
T(x),
count_(0)
{
if( boost::exception * be1=dynamic_cast<boost::exception *>(this) )
if( boost::exception const * be2=dynamic_cast<T const *>(&x) )
*be1 = *be2;
}
private: