mirror of
https://github.com/boostorg/exception.git
synced 2025-07-02 15:31:06 +02:00
Boost Exception now works with BOOST_NO_RTTI and/or BOOST_NO_TYPEID.
[SVN r48429]
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user