mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 03:47:16 +02:00
Unordered: Fix gcc error + warning.
[SVN r73839]
This commit is contained in:
@ -129,7 +129,9 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
|
|
||||||
// size < mlf_ * count
|
// size < mlf_ * count
|
||||||
return double_to_size_t(ceil(
|
return double_to_size_t(ceil(
|
||||||
(double) this->mlf_ * this->max_bucket_count())) - 1;
|
static_cast<double>(this->mlf_) *
|
||||||
|
static_cast<double>(this->max_bucket_count())
|
||||||
|
)) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t calculate_max_load()
|
std::size_t calculate_max_load()
|
||||||
@ -138,7 +140,11 @@ namespace boost { namespace unordered { namespace detail {
|
|||||||
|
|
||||||
// From 6.3.1/13:
|
// From 6.3.1/13:
|
||||||
// Only resize when size >= mlf_ * count
|
// Only resize when size >= mlf_ * count
|
||||||
return double_to_size_t(ceil((double) mlf_ * this->bucket_count_));
|
return double_to_size_t(ceil(
|
||||||
|
static_cast<double>(this->mlf_) *
|
||||||
|
static_cast<double>(this->bucket_count_)
|
||||||
|
)) - 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void max_load_factor(float z)
|
void max_load_factor(float z)
|
||||||
|
@ -455,7 +455,7 @@ void unordered_movable_test(X& x, Key& k, T& /* t */, Hash& hf, Pred& eq)
|
|||||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||||
|
|
||||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
X x1(rvalue_default<X>();
|
X x1(rvalue_default<X>());
|
||||||
X x2(boost::move(x1));
|
X x2(boost::move(x1));
|
||||||
x1 = rvalue_default<X>();
|
x1 = rvalue_default<X>();
|
||||||
x2 = boost::move(x1);
|
x2 = boost::move(x1);
|
||||||
|
Reference in New Issue
Block a user