mirror of
https://github.com/boostorg/exception.git
synced 2025-07-29 12:07:20 +02:00
Fixing bug in exception_ptr cloning of error_info objects.
This commit is contained in:
@ -29,8 +29,7 @@ boost
|
||||
public:
|
||||
|
||||
virtual std::string name_value_string() const = 0;
|
||||
|
||||
protected:
|
||||
virtual error_info_base * clone() const = 0;
|
||||
|
||||
virtual
|
||||
~error_info_base() throw()
|
||||
@ -44,6 +43,11 @@ boost
|
||||
error_info:
|
||||
public exception_detail::error_info_base
|
||||
{
|
||||
error_info_base *
|
||||
clone() const
|
||||
{
|
||||
return new error_info<Tag,T>(*this);
|
||||
}
|
||||
public:
|
||||
typedef T value_type;
|
||||
error_info( value_type const & v ):
|
||||
|
@ -142,7 +142,11 @@ boost
|
||||
refcount_ptr<error_info_container> p;
|
||||
error_info_container_impl * c=new error_info_container_impl;
|
||||
p.adopt(c);
|
||||
c->info_ = info_;
|
||||
for( error_info_map::const_iterator i=info_.begin(),e=info_.end(); i!=e; ++i )
|
||||
{
|
||||
shared_ptr<error_info_base> cp(i->second->clone());
|
||||
c->info_.insert(std::make_pair(i->first,cp));
|
||||
}
|
||||
return p;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user