mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Expand calls to max_size implementation
This commit is contained in:
@ -2776,17 +2776,6 @@ struct table : boost::unordered::detail::functions<typename Types::hasher,
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Load methods
|
||||
|
||||
std::size_t max_size() const
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
// size < mlf_ * count
|
||||
return boost::unordered::detail::double_to_size(
|
||||
ceil(static_cast<double>(mlf_) *
|
||||
static_cast<double>(max_bucket_count()))) -
|
||||
1;
|
||||
}
|
||||
|
||||
void recalculate_max_load()
|
||||
{
|
||||
using namespace std;
|
||||
|
@ -1497,7 +1497,13 @@ unordered_map<K, T, H, P, A>& unordered_map<K, T, H, P, A>::operator=(
|
||||
template <class K, class T, class H, class P, class A>
|
||||
std::size_t unordered_map<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
||||
{
|
||||
return table_.max_size();
|
||||
using namespace std;
|
||||
|
||||
// size <= mlf_ * count
|
||||
return boost::unordered::detail::double_to_size(
|
||||
ceil(static_cast<double>(table_.mlf_) *
|
||||
static_cast<double>(table_.max_bucket_count()))) -
|
||||
1;
|
||||
}
|
||||
|
||||
// modifiers
|
||||
@ -1931,7 +1937,13 @@ unordered_multimap<K, T, H, P, A>& unordered_multimap<K, T, H, P, A>::operator=(
|
||||
template <class K, class T, class H, class P, class A>
|
||||
std::size_t unordered_multimap<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
||||
{
|
||||
return table_.max_size();
|
||||
using namespace std;
|
||||
|
||||
// size <= mlf_ * count
|
||||
return boost::unordered::detail::double_to_size(
|
||||
ceil(static_cast<double>(table_.mlf_) *
|
||||
static_cast<double>(table_.max_bucket_count()))) -
|
||||
1;
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
@ -1193,7 +1193,13 @@ unordered_set<T, H, P, A>& unordered_set<T, H, P, A>::operator=(
|
||||
template <class T, class H, class P, class A>
|
||||
std::size_t unordered_set<T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
||||
{
|
||||
return table_.max_size();
|
||||
using namespace std;
|
||||
|
||||
// size < mlf_ * count
|
||||
return boost::unordered::detail::double_to_size(
|
||||
ceil(static_cast<double>(table_.mlf_) *
|
||||
static_cast<double>(table_.max_bucket_count()))) -
|
||||
1;
|
||||
}
|
||||
|
||||
// modifiers
|
||||
@ -1566,7 +1572,13 @@ unordered_multiset<T, H, P, A>& unordered_multiset<T, H, P, A>::operator=(
|
||||
template <class T, class H, class P, class A>
|
||||
std::size_t unordered_multiset<T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
||||
{
|
||||
return table_.max_size();
|
||||
using namespace std;
|
||||
|
||||
// size < mlf_ * count
|
||||
return boost::unordered::detail::double_to_size(
|
||||
ceil(static_cast<double>(table_.mlf_) *
|
||||
static_cast<double>(table_.max_bucket_count()))) -
|
||||
1;
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
Reference in New Issue
Block a user