mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 10:57:16 +02:00
fixed leak in throwing allocator-extended move ctor
This commit is contained in:
@ -1280,10 +1280,7 @@ public:
|
||||
}
|
||||
|
||||
table_core(table_core&& x,const Allocator& al_):
|
||||
hash_base{empty_init,std::move(x.h())},
|
||||
pred_base{empty_init,std::move(x.pred())},
|
||||
allocator_base{empty_init,al_},arrays(new_arrays(0)),
|
||||
ml{initial_max_load()},size_{0}
|
||||
table_core{std::move(x.h()),std::move(x.pred()),al_}
|
||||
{
|
||||
if(al()==x.al()){
|
||||
std::swap(arrays,x.arrays);
|
||||
@ -1798,6 +1795,15 @@ private:
|
||||
using pred_base=empty_value<Pred,1>;
|
||||
using allocator_base=empty_value<Allocator,2>;
|
||||
|
||||
/* used by allocator-extended move ctor */
|
||||
|
||||
table_core(Hash&& h_,Pred&& pred_,const Allocator& al_):
|
||||
hash_base{empty_init,std::move(h_)},
|
||||
pred_base{empty_init,std::move(pred_)},
|
||||
allocator_base{empty_init,al_},arrays(new_arrays(0)),
|
||||
ml{initial_max_load()},size_{0}
|
||||
{}
|
||||
|
||||
arrays_type new_arrays(std::size_t n)
|
||||
{
|
||||
return arrays_type::new_(al(),n);
|
||||
|
Reference in New Issue
Block a user