mirror of
https://github.com/boostorg/exception.git
synced 2025-07-21 08:22:05 +02:00
Fix sp_typeinfo to match the interface of std::type_info.
[SVN r58127]
This commit is contained in:
@ -48,12 +48,12 @@ boost
|
|||||||
struct
|
struct
|
||||||
type_info_
|
type_info_
|
||||||
{
|
{
|
||||||
detail::sp_typeinfo type_;
|
detail::sp_typeinfo const * type_;
|
||||||
char const * name_;
|
char const * name_;
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
type_info_( detail::sp_typeinfo type, char const * name ):
|
type_info_( detail::sp_typeinfo const & type, char const * name ):
|
||||||
type_(type),
|
type_(&type),
|
||||||
name_(name)
|
name_(name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -62,14 +62,14 @@ boost
|
|||||||
bool
|
bool
|
||||||
operator==( type_info_ const & a, type_info_ const & b )
|
operator==( type_info_ const & a, type_info_ const & b )
|
||||||
{
|
{
|
||||||
return a.type_==b.type_;
|
return (*a.type_)==(*b.type_);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend
|
friend
|
||||||
bool
|
bool
|
||||||
operator<( type_info_ const & a, type_info_ const & b )
|
operator<( type_info_ const & a, type_info_ const & b )
|
||||||
{
|
{
|
||||||
return a.type_<b.type_;
|
return 0!=(a.type_->before(*b.type_));
|
||||||
}
|
}
|
||||||
|
|
||||||
char const *
|
char const *
|
||||||
|
Reference in New Issue
Block a user