diff options
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++11/hashtable_c++0x.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/src/c++11/hashtable_c++0x.cc b/libstdc++-v3/src/c++11/hashtable_c++0x.cc index 22de51b..69f999f 100644 --- a/libstdc++-v3/src/c++11/hashtable_c++0x.cc +++ b/libstdc++-v3/src/c++11/hashtable_c++0x.cc @@ -56,8 +56,10 @@ namespace __detail return __fast_bkt[__n]; } + constexpr auto __n_primes + = sizeof(__prime_list) / sizeof(unsigned long) - 1; const unsigned long* __next_bkt = - std::lower_bound(__prime_list + 5, __prime_list + _S_n_primes, __n); + std::lower_bound(__prime_list + 5, __prime_list + __n_primes, __n); _M_next_resize = __builtin_ceil(*__next_bkt * (long double)_M_max_load_factor); return *__next_bkt; |