diff options
author | Andrey Khalyavin <[email protected]> | 2022-04-15 02:46:40 +0300 |
---|---|---|
committer | Andrey Khalyavin <[email protected]> | 2022-04-15 02:46:40 +0300 |
commit | c5bfd90690e2df55f55d1831b0edd2e1c7241582 (patch) | |
tree | cda6bc446bf17fc110b67126b4c5ddc640fa427b /contrib/libs/cxxsupp/libcxx/include/unordered_map | |
parent | 599463a2ac4bda8536564ec6d7b798447755f05f (diff) |
Update libc++ to b6d87773 (14 Jan 2022).
Notable changes:
* implement operator << for filesystem::directory_entry
* add std::ranges::in_in_result
* add std::ranges::owning_view
* add std::ranges::cdata
* add std::ranges::construct_at and destroy{,_n,_at}
* small fixes in std::ranges::data
* SFINAE away std::ranges::cbegin(const T&&) for non-borrowed T
* use arc4random to implement std::random_device on Apple
* introduce __fits_in_sso to put constexpr check into a central place
* introduce __debug_db_insert_c to put #if and constexpr check into a central place
ref:b3dd06bd52f06e8939227ca0f0a5873d0c211e48
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/unordered_map')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/unordered_map | 116 |
1 files changed, 32 insertions, 84 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/unordered_map b/contrib/libs/cxxsupp/libcxx/include/unordered_map index 49edb8765be..3520fe20667 100644 --- a/contrib/libs/cxxsupp/libcxx/include/unordered_map +++ b/contrib/libs/cxxsupp/libcxx/include/unordered_map @@ -1068,11 +1068,9 @@ public: _LIBCPP_INLINE_VISIBILITY unordered_map() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) - { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif - } + { + _VSTD::__debug_db_insert_c(this); + } explicit unordered_map(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); unordered_map(size_type __n, const hasher& __hf, @@ -1625,9 +1623,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( size_type __n, const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1637,9 +1633,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1649,9 +1643,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const allocator_type& __a) : __table_(typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); } template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> @@ -1659,9 +1651,7 @@ template <class _InputIterator> unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( _InputIterator __first, _InputIterator __last) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); insert(__first, __last); } @@ -1672,9 +1662,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1686,9 +1674,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1698,9 +1684,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const unordered_map& __u) : __table_(__u.__table_) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1710,9 +1694,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const unordered_map& __u, const allocator_type& __a) : __table_(__u.__table_, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1726,8 +1708,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) : __table_(_VSTD::move(__u.__table_)) { + _VSTD::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); __get_db()->swap(this, &__u); #endif } @@ -1737,9 +1719,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( unordered_map&& __u, const allocator_type& __a) : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); @@ -1758,9 +1738,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( initializer_list<value_type> __il) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -1770,9 +1748,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1783,9 +1759,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -2003,11 +1977,9 @@ public: _LIBCPP_INLINE_VISIBILITY unordered_multimap() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) - { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif - } + { + _VSTD::__debug_db_insert_c(this); + } explicit unordered_multimap(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); unordered_multimap(size_type __n, const hasher& __hf, @@ -2427,9 +2399,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( size_type __n, const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -2439,9 +2409,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -2450,9 +2418,7 @@ template <class _InputIterator> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( _InputIterator __first, _InputIterator __last) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); insert(__first, __last); } @@ -2463,9 +2429,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -2477,9 +2441,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -2490,9 +2452,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const allocator_type& __a) : __table_(typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); } template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> @@ -2500,9 +2460,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const unordered_multimap& __u) : __table_(__u.__table_) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -2512,9 +2470,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const unordered_multimap& __u, const allocator_type& __a) : __table_(__u.__table_, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -2528,8 +2484,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) : __table_(_VSTD::move(__u.__table_)) { + _VSTD::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); __get_db()->swap(this, &__u); #endif } @@ -2539,9 +2495,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( unordered_multimap&& __u, const allocator_type& __a) : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); @@ -2561,9 +2515,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( initializer_list<value_type> __il) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -2573,9 +2525,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const key_equal& __eql) : __table_(__hf, __eql) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -2586,9 +2536,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { -#if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__insert_c(this); -#endif + _VSTD::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } |