summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__hash_table
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2024-01-26 10:38:46 +0300
committermikhnenko <[email protected]>2024-01-26 11:13:08 +0300
commit885b105cca4721eee2ee14d6b83d856dac3739ef (patch)
treec40b876bba01bcb469aadd981ef6d9dcbbbd589d /contrib/libs/cxxsupp/libcxx/include/__hash_table
parent15e6154017194456fd8a7a76513e14aa4ae5f5d1 (diff)
Update libcxx to 02 June 2023 185b81e034ba60081023b6e59504dfffb560f3e3 (llvmorg-16.0.5)
:warning: Для всех проектов и мимо проходящим коллегам :warning: Если по каким-то причинам ваши тесты подломались, пожалуйста, переканонизируйте их сами. По статистике там просто поменялся порядок в канонизации. Если изменения действительно серьезные -- приходите в [DEVTOOLSSUPPORT](https://st.yandex-team.ru/createTicket?queue=DEVTOOLSSUPPORT) / пишите в телеграм / призывайте в тикеты, будем разбираться. ``` Changes: [libc++] Don't try to provide source_location on AppleClang 1403 [release/16.x][libc++] Revert the bitset sort optimization [libc++] Avoid ODR violations in __exception_guard [libc++][ranges] Fix incorrect integer typedef in `elements_view` test. [libc++][format] Fix a missing include in tests. [libc++][format] Fixes invalid usage of m type. [libc++][format] Fix floating point formatting. [libc++] Fix ranges::binary_search() returning true for cases where the element is not in the range [libc++] Temporarily not use compiler intrinsics for some type traits in Objective-C++ mode. [libc++][ranges] move all range iterators back in class [libcxx][ranges] revert join_view::iterator and sentinel to be in-class [libc++] Add FTM for views::as_rvalue [libc++] Fix bug in allocate_shared_for_overwrite [libc++] fix `shared_ptr`'s incorrect constraints [libc++] In tests, use `abort` to terminate upon an error. [libc++] Guard the fix to CityHash behind ABI v2 [libc++][format] Fixes constexpr validation. [libc++] Remove use of internal glibc macros to determine if c8rtomb() and mbrtoc8() are present. [libc++] Fixes the Clang modular build. [libc++][ranges] Temporarily mark `ranges::join_view` as experimental. libcxx: Don't apply ABI tags to extern "C" fns [libc++] Introduce a compile-time mechanism to override __libcpp_verbose_abort [libc++][format] Fixes usage of contiguous ranges. [libc++][doc] Updates format status. [libc++][ranges] implement `std::ranges::split_view` [libc++] implement P1020R1 P1973R1 make_unique[shared]_for_overwrite [libc++] Improve binary size when using __transaction [libc++] Rename take_while_view::__sentinel to __take_while_view_sentinel [libc++] Granularize <type_traits> includes in <bit>, <numbers> and <coroutine> [libc++] Implement P1413R3 (Deprecate std::aligned_storage and std::aligned_union) [libc++] Add FreeBSD XFAILs in preparation for CI [libc++] add FreeBSD atomic wait support [libc++][format] range-default-formatter for set. [libc++] Move iota_view::iterator and sentinel out of iota_view [libc++] Enable clang-tidy from the buildkite pipeline instead of hard-coding it in run-buildbot [libc++] Enable segmented iterator optimizations for join_view::iterator [libc++] Mark LWG3349 as complete [libc++] Remove old CI configurations and update the supported compiler versions [libc++] Implement P2446R2 (views::as_rvalue) [libc++][format] range-default-formatter for map [libc++][format] Adds formatter std::vector<bool>. [libc++][format] Adds container adaptor formatters. [libc++][format] Implements range_formatter [libc++][format] Adds new test macros. [libc++][ranges] Remove a leftover include version control markers in Cxx20Papers.csv [libc++][ranges] Mark completed Ranges papers and issues as done, bump version macro [libc++] Add ALLOW_RETRIES to a few flaky tests [SystemZ][z/OS] Fix cityhash lit for EBCDIC [libc++] Mark std::pmr virtual functions as _LIBCPP_HIDE_FROM_ABI_VIRTUAL [libc++] Remove <type_traits> includes from <atomic> and <ratio> [libcxx] Add missing includes [libc++] allow redefined macro in non_trivial_copy_move_ABI test [libc++][ranges] implement `std::views::elements_view` [libc++] Add [[clang::lifetimebound]] attribute to std::forward and friends Reapply "[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`" [libc++] Add clang-tidy to the list of possible substitutions for %{clang-tidy} [libc++] Add missing includes in move_iterator.h [libc++] Make pmr::monotonic_buffer_resource bump down [libc++] Add [[nodiscard]] extensions in <math.h> [libc++] Fix ranges::uninitialized_move{, _n} for move-only types [libc++][ranges] Fix incorrect integer type in `view_interface` tests. [libc++] Hold mutex lock while notify_all is called at notify_all_at_thread_exit [Libcxx] Add <source_location> header. [libc++] Rename transform_view::{__iterator, __sentinel} to __transform_view_{iterator, sentinel} [libc++] Add FreeBSD exceptions.nonew ABI list [libc++][format] Fixes escaping string literals. [libc++] Use _LIBCPP_HIDE_FROM_ABI_VIRTUAL instead of _LIBCPP_INLINE_VISIBILITY attribute on virtual function [libc++][test] Move `common_input_iterator` to `test_iterators.h` [libc++][utils] Remove unused import in `run.py` [libc++] Remove warning for `LIBCXX_SYSROOT`, `LIBCXX_TARGET_TRIPLE`, and `LIBCXX_GCC_TOOLCHAIN` [libc++] Fix aligned_alloc usage for Android [libc++] Use %{clang-query} when calling clang-query [libc++] Add missing include in __format/unicode.h [libc++] Remove HIDE_FROM_ABI from virtual functions [libc++] Fix transitive includes list for C++23 [libc++] Add _LIBCPP_HIDE_FROM_ABI to __constexpr_logb and __constexpr_scalbn [libc++] Granularize <bit> and remove <__bits> [libc++] [C++20] [P0415] Constexpr for std::complex. libc++: bring back the unsigned in the return type in wcstoull_l [libc++][CI] Improves clang-(tidy|query) selection. [libc++] Granularize <type_traits> includes in <iterator> [libc++] Implement constexpr {isfinite, isinf, isnan, isnormal} [libc++][chrono] Add calendar type formatters. [libc++] LWG3738 Validates a missing precondition. [libc++] LWG3745 noexcept for atomic_wait. [libc++] Granularize <type_traits> includes in <compare> std::sort: add BlockQuickSort partitioning algorithm for arithmetic types [libc++] Granularize <type_traits> includes in <utility> [libc++][format] Removes test redundancy. [libc++][format] Adds formatter for tuple and pair [libc++] Use aligned_alloc instead of posix_memalign for C++17 [libc++] Rename __tuple to __tuple_dir to avoid file collision [libc++] Add FreeBSD ABI list [libc++] Adds __cpp_lib_constexpr_algorithms to utility. [libc++] Granularize <type_traits> includes in <concepts [libc++][format] Renames __null_sentinel. Implementstd::ranges::view_interface::size returns a signed type [libc++] Implement P1169R4 (static operator()) [libc++] Implement `std::expected` P0323R12 [libc++][Android] Disable pbump2gig for Android [libc++][Android] Android/Bionic headers don't work with modules yet [libc++][math.h] Add double overloads [libc++] Move filter_view::iterator and sentinel out of filter_view [libc++] Implement P0339R6 (polymorphic_allocator<> as a vocabulary type) [libc++][format] Adds range-default-formatter. [libc++][Android] Rename user NS to User to avoid conflict with struct [libc++] Fix memory leaks when throwing inside std::vector constructors ```
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__hash_table')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__hash_table96
1 files changed, 48 insertions, 48 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__hash_table b/contrib/libs/cxxsupp/libcxx/include/__hash_table
index d6af75e9e0f..f8896c8664e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__hash_table
+++ b/contrib/libs/cxxsupp/libcxx/include/__hash_table
@@ -13,7 +13,7 @@
#include <__algorithm/max.h>
#include <__algorithm/min.h>
#include <__assert>
-#include <__bits> // __libcpp_clz
+#include <__bit/countl.h>
#include <__config>
#include <__debug>
#include <__functional/hash.h>
@@ -565,7 +565,7 @@ public:
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to increment a non-incrementable unordered container local_iterator");
__node_ = __node_->__next_;
- if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
+ if (__node_ != nullptr && std::__constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
__node_ = nullptr;
return *this;
}
@@ -698,7 +698,7 @@ public:
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to increment a non-incrementable unordered container const_local_iterator");
__node_ = __node_->__next_;
- if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
+ if (__node_ != nullptr && std::__constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
__node_ = nullptr;
return *this;
}
@@ -1156,11 +1156,11 @@ public:
_LIBCPP_INLINE_VISIBILITY void __rehash_multi(size_type __n) { __rehash<false>(__n); }
_LIBCPP_INLINE_VISIBILITY void __reserve_unique(size_type __n)
{
- __rehash_unique(static_cast<size_type>(ceil(__n / max_load_factor())));
+ __rehash_unique(static_cast<size_type>(std::ceil(__n / max_load_factor())));
}
_LIBCPP_INLINE_VISIBILITY void __reserve_multi(size_type __n)
{
- __rehash_multi(static_cast<size_type>(ceil(__n / max_load_factor())));
+ __rehash_multi(static_cast<size_type>(std::ceil(__n / max_load_factor())));
}
_LIBCPP_INLINE_VISIBILITY
@@ -1184,7 +1184,7 @@ public:
{
_LIBCPP_ASSERT(bucket_count() > 0,
"unordered container::bucket(key) called when bucket_count() == 0");
- return __constrain_hash(hash_function()(__k), bucket_count());
+ return std::__constrain_hash(hash_function()(__k), bucket_count());
}
template <class _Key>
@@ -1433,7 +1433,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
{
if (size() > 0)
{
- __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
+ __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
__p1_.first().__ptr();
__u.__p1_.first().__next_ = nullptr;
__u.size() = 0;
@@ -1457,7 +1457,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
{
__p1_.first().__next_ = __u.__p1_.first().__next_;
__u.__p1_.first().__next_ = nullptr;
- __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
+ __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
__p1_.first().__ptr();
size() = __u.size();
__u.size() = 0;
@@ -1574,7 +1574,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
__p1_.first().__next_ = __u.__p1_.first().__next_;
if (size() > 0)
{
- __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
+ __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
__p1_.first().__ptr();
__u.__p1_.first().__next_ = nullptr;
__u.size() = 0;
@@ -1789,12 +1789,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
if (__bc != 0)
{
- size_t __chash = __constrain_hash(__hash, __bc);
+ size_t __chash = std::__constrain_hash(__hash, __bc);
__next_pointer __ndptr = __bucket_list_[__chash];
if (__ndptr != nullptr)
{
for (__ndptr = __ndptr->__next_; __ndptr != nullptr &&
- __constrain_hash(__ndptr->__hash(), __bc) == __chash;
+ std::__constrain_hash(__ndptr->__hash(), __bc) == __chash;
__ndptr = __ndptr->__next_)
{
if (key_eq()(__ndptr->__upcast()->__value_, __value))
@@ -1804,8 +1804,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
}
if (size()+1 > __bc * max_load_factor() || __bc == 0)
{
- __rehash_unique(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
- size_type(ceil(float(size() + 1) / max_load_factor()))));
+ __rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
+ size_type(std::ceil(float(size() + 1) / max_load_factor()))));
}
return nullptr;
}
@@ -1821,7 +1821,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_perform(
__node_pointer __nd) _NOEXCEPT
{
size_type __bc = bucket_count();
- size_t __chash = __constrain_hash(__nd->__hash(), __bc);
+ size_t __chash = std::__constrain_hash(__nd->__hash(), __bc);
// insert_after __bucket_list_[__chash], or __first_node if bucket is null
__next_pointer __pn = __bucket_list_[__chash];
if (__pn == nullptr)
@@ -1832,7 +1832,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_perform(
// fix up __bucket_list_
__bucket_list_[__chash] = __pn;
if (__nd->__next_ != nullptr)
- __bucket_list_[__constrain_hash(__nd->__next_->__hash(), __bc)] = __nd->__ptr();
+ __bucket_list_[std::__constrain_hash(__nd->__next_->__hash(), __bc)] = __nd->__ptr();
}
else
{
@@ -1876,16 +1876,16 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_prepare(
size_type __bc = bucket_count();
if (size()+1 > __bc * max_load_factor() || __bc == 0)
{
- __rehash_multi(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
- size_type(ceil(float(size() + 1) / max_load_factor()))));
+ __rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
+ size_type(std::ceil(float(size() + 1) / max_load_factor()))));
__bc = bucket_count();
}
- size_t __chash = __constrain_hash(__cp_hash, __bc);
+ size_t __chash = std::__constrain_hash(__cp_hash, __bc);
__next_pointer __pn = __bucket_list_[__chash];
if (__pn != nullptr)
{
for (bool __found = false; __pn->__next_ != nullptr &&
- __constrain_hash(__pn->__next_->__hash(), __bc) == __chash;
+ std::__constrain_hash(__pn->__next_->__hash(), __bc) == __chash;
__pn = __pn->__next_)
{
// __found key_eq() action
@@ -1917,7 +1917,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_perform(
__node_pointer __cp, __next_pointer __pn) _NOEXCEPT
{
size_type __bc = bucket_count();
- size_t __chash = __constrain_hash(__cp->__hash_, __bc);
+ size_t __chash = std::__constrain_hash(__cp->__hash_, __bc);
if (__pn == nullptr)
{
__pn =__p1_.first().__ptr();
@@ -1926,7 +1926,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_perform(
// fix up __bucket_list_
__bucket_list_[__chash] = __pn;
if (__cp->__next_ != nullptr)
- __bucket_list_[__constrain_hash(__cp->__next_->__hash(), __bc)]
+ __bucket_list_[std::__constrain_hash(__cp->__next_->__hash(), __bc)]
= __cp->__ptr();
}
else
@@ -1935,7 +1935,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_perform(
__pn->__next_ = __cp->__ptr();
if (__cp->__next_ != nullptr)
{
- size_t __nhash = __constrain_hash(__cp->__next_->__hash(), __bc);
+ size_t __nhash = std::__constrain_hash(__cp->__next_->__hash(), __bc);
if (__nhash != __chash)
__bucket_list_[__nhash] = __cp->__ptr();
}
@@ -1970,11 +1970,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
size_type __bc = bucket_count();
if (size()+1 > __bc * max_load_factor() || __bc == 0)
{
- __rehash_multi(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
- size_type(ceil(float(size() + 1) / max_load_factor()))));
+ __rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
+ size_type(std::ceil(float(size() + 1) / max_load_factor()))));
__bc = bucket_count();
}
- size_t __chash = __constrain_hash(__cp->__hash_, __bc);
+ size_t __chash = std::__constrain_hash(__cp->__hash_, __bc);
__next_pointer __pp = __bucket_list_[__chash];
while (__pp->__next_ != __np)
__pp = __pp->__next_;
@@ -2001,12 +2001,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
size_t __chash;
if (__bc != 0)
{
- __chash = __constrain_hash(__hash, __bc);
+ __chash = std::__constrain_hash(__hash, __bc);
__nd = __bucket_list_[__chash];
if (__nd != nullptr)
{
for (__nd = __nd->__next_; __nd != nullptr &&
- (__nd->__hash() == __hash || __constrain_hash(__nd->__hash(), __bc) == __chash);
+ (__nd->__hash() == __hash || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
__nd = __nd->__next_)
{
if (key_eq()(__nd->__upcast()->__value_, __k))
@@ -2018,10 +2018,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
__node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...);
if (size()+1 > __bc * max_load_factor() || __bc == 0)
{
- __rehash_unique(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
- size_type(ceil(float(size() + 1) / max_load_factor()))));
+ __rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
+ size_type(std::ceil(float(size() + 1) / max_load_factor()))));
__bc = bucket_count();
- __chash = __constrain_hash(__hash, __bc);
+ __chash = std::__constrain_hash(__hash, __bc);
}
// insert_after __bucket_list_[__chash], or __first_node if bucket is null
__next_pointer __pn = __bucket_list_[__chash];
@@ -2033,7 +2033,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
// fix up __bucket_list_
__bucket_list_[__chash] = __pn;
if (__h->__next_ != nullptr)
- __bucket_list_[__constrain_hash(__h->__next_->__hash(), __bc)]
+ __bucket_list_[std::__constrain_hash(__h->__next_->__hash(), __bc)]
= __h.get()->__ptr();
}
else
@@ -2229,7 +2229,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
if (__n == 1)
__n = 2;
else if (__n & (__n - 1))
- __n = __next_prime(__n);
+ __n = std::__next_prime(__n);
size_type __bc = bucket_count();
if (__n > __bc)
__do_rehash<_UniqueKeys>(__n);
@@ -2238,8 +2238,8 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
__n = _VSTD::max<size_type>
(
__n,
- __is_hash_power2(__bc) ? __next_hash_pow2(size_t(ceil(float(size()) / max_load_factor()))) :
- __next_prime(size_t(ceil(float(size()) / max_load_factor())))
+ std::__is_hash_power2(__bc) ? std::__next_hash_pow2(size_t(std::ceil(float(size()) / max_load_factor()))) :
+ std::__next_prime(size_t(std::ceil(float(size()) / max_load_factor())))
);
if (__n < __bc)
__do_rehash<_UniqueKeys>(__n);
@@ -2264,13 +2264,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__do_rehash(size_type __nbc)
__next_pointer __cp = __pp->__next_;
if (__cp != nullptr)
{
- size_type __chash = __constrain_hash(__cp->__hash(), __nbc);
+ size_type __chash = std::__constrain_hash(__cp->__hash(), __nbc);
__bucket_list_[__chash] = __pp;
size_type __phash = __chash;
for (__pp = __cp, void(), __cp = __cp->__next_; __cp != nullptr;
__cp = __pp->__next_)
{
- __chash = __constrain_hash(__cp->__hash(), __nbc);
+ __chash = std::__constrain_hash(__cp->__hash(), __nbc);
if (__chash == __phash)
__pp = __cp;
else
@@ -2312,13 +2312,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k)
size_type __bc = bucket_count();
if (__bc != 0)
{
- size_t __chash = __constrain_hash(__hash, __bc);
+ size_t __chash = std::__constrain_hash(__hash, __bc);
__next_pointer __nd = __bucket_list_[__chash];
if (__nd != nullptr)
{
for (__nd = __nd->__next_; __nd != nullptr &&
(__nd->__hash() == __hash
- || __constrain_hash(__nd->__hash(), __bc) == __chash);
+ || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
__nd = __nd->__next_)
{
if ((__nd->__hash() == __hash)
@@ -2339,13 +2339,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
size_type __bc = bucket_count();
if (__bc != 0)
{
- size_t __chash = __constrain_hash(__hash, __bc);
+ size_t __chash = std::__constrain_hash(__hash, __bc);
__next_pointer __nd = __bucket_list_[__chash];
if (__nd != nullptr)
{
for (__nd = __nd->__next_; __nd != nullptr &&
(__hash == __nd->__hash()
- || __constrain_hash(__nd->__hash(), __bc) == __chash);
+ || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
__nd = __nd->__next_)
{
if ((__nd->__hash() == __hash)
@@ -2467,7 +2467,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
// current node
__next_pointer __cn = __p.__node_;
size_type __bc = bucket_count();
- size_t __chash = __constrain_hash(__cn->__hash(), __bc);
+ size_t __chash = std::__constrain_hash(__cn->__hash(), __bc);
// find previous node
__next_pointer __pn = __bucket_list_[__chash];
for (; __pn->__next_ != __cn; __pn = __pn->__next_)
@@ -2476,16 +2476,16 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
// if __pn is not in same bucket (before begin is not in same bucket) &&
// if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
if (__pn == __p1_.first().__ptr()
- || __constrain_hash(__pn->__hash(), __bc) != __chash)
+ || std::__constrain_hash(__pn->__hash(), __bc) != __chash)
{
if (__cn->__next_ == nullptr
- || __constrain_hash(__cn->__next_->__hash(), __bc) != __chash)
+ || std::__constrain_hash(__cn->__next_->__hash(), __bc) != __chash)
__bucket_list_[__chash] = nullptr;
}
// if __cn->__next_ is not in same bucket (nullptr is in same bucket)
if (__cn->__next_ != nullptr)
{
- size_t __nhash = __constrain_hash(__cn->__next_->__hash(), __bc);
+ size_t __nhash = std::__constrain_hash(__cn->__next_->__hash(), __bc);
if (__nhash != __chash)
__bucket_list_[__nhash] = __pn;
}
@@ -2639,10 +2639,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
__p2_.swap(__u.__p2_);
__p3_.swap(__u.__p3_);
if (size() > 0)
- __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
+ __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
__p1_.first().__ptr();
if (__u.size() > 0)
- __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash(), __u.bucket_count())] =
+ __u.__bucket_list_[std::__constrain_hash(__u.__p1_.first().__next_->__hash(), __u.bucket_count())] =
__u.__p1_.first().__ptr();
std::__debug_db_swap(this, std::addressof(__u));
}
@@ -2659,8 +2659,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const
if (__np != nullptr)
{
for (__np = __np->__next_; __np != nullptr &&
- __constrain_hash(__np->__hash(), __bc) == __n;
- __np = __np->__next_, (void) ++__r)
+ std::__constrain_hash(__np->__hash(), __bc) == __n;
+ __np = __np->__next_, (void) ++__r)
;
}
return __r;