forked from boostorg/unordered
initialized ml at ctor body (GCC 4.8/4.9 complains otherwise)
This commit is contained in:
@ -862,9 +862,11 @@ public:
|
|||||||
std::size_t n=0,const Hash& h_=Hash(),const Pred& pred_=Pred(),
|
std::size_t n=0,const Hash& h_=Hash(),const Pred& pred_=Pred(),
|
||||||
const Allocator& al_=Allocator()):
|
const Allocator& al_=Allocator()):
|
||||||
hash_base{empty_init,h_},pred_base{empty_init,pred_},
|
hash_base{empty_init,h_},pred_base{empty_init,pred_},
|
||||||
allocator_base{empty_init,al_},size_{0},arrays{new_arrays(n)},
|
allocator_base{empty_init,al_},size_{0},arrays{new_arrays(n)}
|
||||||
ml{max_load()}
|
{
|
||||||
{}
|
/* GCC 4.8/4.9 emits funky errors if cted at initializer list */
|
||||||
|
ml=max_load();
|
||||||
|
}
|
||||||
|
|
||||||
table(const table& x):
|
table(const table& x):
|
||||||
table(x,alloc_traits::select_on_container_copy_construction(x.al())){}
|
table(x,alloc_traits::select_on_container_copy_construction(x.al())){}
|
||||||
@ -889,9 +891,11 @@ public:
|
|||||||
hash_base{empty_init,x.h()},pred_base{empty_init,x.pred()},
|
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{
|
arrays{
|
||||||
new_arrays(std::size_t(std::ceil(static_cast<float>(x.size())/mlf)))},
|
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 */
|
||||||
|
ml=max_load();
|
||||||
|
|
||||||
BOOST_TRY{
|
BOOST_TRY{
|
||||||
x.for_all_elements([this](value_type* p){
|
x.for_all_elements([this](value_type* p){
|
||||||
unchecked_insert(*p);
|
unchecked_insert(*p);
|
||||||
|
Reference in New Issue
Block a user