Fix and unit test for issue #37

This commit is contained in:
Emil Dotchevski
2021-02-11 16:02:14 -08:00
parent e69635b1a7
commit 20c833978f
7 changed files with 62 additions and 10 deletions

View File

@ -11,6 +11,7 @@
#include <boost/core/demangle.hpp>
#include <boost/current_function.hpp>
#include <string>
#include <string.h>
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
@ -69,7 +70,7 @@ boost
bool
operator<( type_info_ const & a, type_info_ const & b )
{
return 0!=(a.type_->before(*b.type_));
return a.type_!=b.type_ && strcmp(a.type_->name(), b.type_->name()) < 0;
}
};
}

View File

@ -86,9 +86,6 @@ boost
if( info_.end()!=i )
{
shared_ptr<error_info_base> const & p = i->second;
#ifndef BOOST_NO_RTTI
BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );
#endif
return p;
}
return shared_ptr<error_info_base>();