reverted b3754b10c8 and 5fc929b829 and s/{}/() in arrays initialization

This commit is contained in:
joaquintides
2022-10-07 16:32:57 +02:00
parent b3754b10c8
commit 049a1ec8f6

View File

@ -855,12 +855,9 @@ public:
std::size_t n=0,const Hash& h_=Hash(),const Pred& pred_=Pred(),
const Allocator& al_=Allocator()):
hash_base{empty_init,h_},pred_base{empty_init,pred_},
allocator_base{empty_init,al_},size_{0}
{
/* GCC 4.8/4.9 emits funky errors if cted at initializer list */
arrays=new_arrays(n);
ml=max_load();
}
allocator_base{empty_init,al_},size_{0},arrays(new_arrays(n)),
ml{max_load()}
{}
table(const table& x):
table(x,alloc_traits::select_on_container_copy_construction(x.al())){}
@ -874,7 +871,7 @@ public:
hash_base{empty_init,std::move(x.h())},
pred_base{empty_init,std::move(x.pred())},
allocator_base{empty_init,std::move(x.al())},
size_{x.size_},arrays{x.arrays},ml{x.ml}
size_{x.size_},arrays(x.arrays),ml{x.ml}
{
x.size_=0;
x.arrays=x.new_arrays(0);
@ -883,13 +880,11 @@ public:
table(const table& x,const Allocator& al_):
hash_base{empty_init,x.h()},pred_base{empty_init,x.pred()},
allocator_base{empty_init,al_},size_{0}
allocator_base{empty_init,al_},size_{0},
arrays(
new_arrays(std::size_t(std::ceil(static_cast<float>(x.size())/mlf)))),
ml{max_load()}
{
/* GCC 4.8/4.9 emits funky errors if cted at initializer list */
arrays=
new_arrays(std::size_t(std::ceil(static_cast<float>(x.size())/mlf)));
ml=max_load();
BOOST_TRY{
x.for_all_elements([this](value_type* p){
unchecked_insert(*p);