diff options
author | mikhnenko <[email protected]> | 2025-02-25 10:55:30 +0300 |
---|---|---|
committer | mikhnenko <[email protected]> | 2025-02-25 11:10:50 +0300 |
commit | ba3f1646a3a22daceac94dd0cd330152b1d5b5b5 (patch) | |
tree | 16da0d516f0c768c219e6f0fc7351676e390873f /contrib/libs/cxxsupp/libcxx/include/unordered_map | |
parent | dda9be9e1fde150b4473d9d10ec1a0d3829f7482 (diff) |
Update libcxx to 8 July 2024
{% cut "Change log" %}
```
[libc++] Add a test case for std::bit_cast with std::complex (#97751)
[libc++] Update status after the St. Louis meeting. (#97951)
[libc++] Guard transitive include of `<locale>` with availability macro (#97869)
[libc++] Restore `__synth_three_way` lambda (#90398)
[libc++][TZDB] Makes implementation experimental. (#95657)
[libc++] Remove dead code from the locale base API and support code (#89070)
[libc++] Assume newer LLVM versions for not-yet-released macOS versions
[libc++] Remove annotations for GCC 13 and update the documentation (#97744)
[libc++][test] Updates sized deallocation tests. (#97833)
[libc++] Adds a missing include.
[libc++] Use __is_array if the builtin is fixed (#93037)
[libc++] Use _Complex for multiplication and division of complex floating point types (#83575)
[libc++] Adds a new feature-test macro generator class. (#90889)
[libc++][chrono] Fixes leap seconds. (#90070)
[libc++] Upgrade to GCC 14 (#97205)
[libc++] Fix the signatures of `std::rethrow_if_nested` (#91365)
[libc++] Use GCC compilers from compiler explorer (#97219)
Add a regression test for recent regression in pair. (#97355)
[libcxx][Docs] Correct link syntax in hardening docs
[libc++] Don't use a ppa for GCC
[libc++] Upgrade to GCC 14 in the CI (#95212)
[libc++abi] Fix test failures with GCC 14 (#95759)
[libc++] Clean up and update deployment target features (#96312)
[libc++] Fix how we pass /MANIFEST flag on Windows without clang-cl (#96967)
[libc++] Classify iota_view precondition (#96662)
[libc++] restrict the expected conversion constructor not compete against copy constructor (#96101)
"[libc++] Try again LWG3233 Broken requirements for shared_ptr converting constructors" (#96103)
[libc++] LWG3382: NTTP for `pair` and `array` (#85811)
[libc++] Get the GCC build mostly clean of warnings (#96604)
[libc++] P3029R1: Better `mdspan`'s CTAD - `std::extents` (#89015)
[libc++] Move allocator assertion into allocator_traits (#94750)
[libc++] change the visibility of libc++ header to public in libcxx module (#91240)
[libc++] Use _If for conditional_t (#96193)
[libc++] Remove the allocator<const T> extension (#96319)
[libc++] Fix incorrect overflow checking in std::lcm (#96310)
[libc++] Use __is_nothrow_destructible (#95766)
[libc++] Remove Windows-specific configuration from libcxx/test/CMakeLists.txt (#96330)
[libc++] Build with -fsized-deallocation (#96217)
[libc++] <experimental/simd> Add swap functions of simd reference (#86478)
[libc++] Fix deployment target Lit features (#94791)
[libc++] Workaround clang bug in __has_unique_object_representations (#95314)
[libc++] Remove <ostream> include from <chrono> (#96035)
[libc++] Fix triviality of std::pair for trivially copyable types without an assignment operator (#95444)
[libc++] Install Python packaging to resolve LLDB data formatter issues (#95971)
[libc++] Properly define _LIBCPP_HAS_NO_UNICODE in __config_site (#95138)
[libc++] Refactor<__type_traits/is_swappable.h> (#86822)
[libc++] Enable modernize-use-equals-delete (#93293)
[libc++] Test suite adjustments on macOS (#95835)
[libc++] Guard transitive include of `<locale>` with availability macro (#95686)
[libc++] Mark more types as trivially relocatable (#89724)
[libcxx] [ci] Simplify the mingw x86_64 configs (#95609)
[libc++][TZDB] Disables a failing test. (#95659)
[libc++] Add default copy ctor to "__chrono/exception.h" (#95338)
[libcxx][test][AIX] address more platform differences in locale tests (#94826)
[libc++] Remove unnecessary #ifdef guards around PSTL implementation details (#95268)
[libc++] Mark local_time test as a long test (#95170)
Update actions-runner version for libc++ builder images
[libc++] Move the implementation of CPU-based basis operations to namespace __pstl (#95267)
[libc++][modules] Mark as implemented. (#90091)
[libc++] Adds __cpp_lib_three_way_comparison FTM. (#91515)
[libc++] Overhaul the PSTL dispatching mechanism (#88131)
[libcxx] Correct and clean-up filesystem operations error_code paths (#88341)
[libc++][z/OS] Disable portion of formatter.char.funsigned-char.pass.cpp for no unicode (#94044)
[libc++] Mark a few functions in the dylib as noexcept (#94098)
[libc++] Fix UB in filesystem::__copy for non-existent destination. (#87615)
[libc++] Simplify the definition of string::operator== (#95000)
[libc++] Update with LWG issue number for shared-ptr constructor
[libc++] Tweak how we check constraints on shared_ptr(nullptr_t) (#94996)
[HWASan] make get_info.local_time.pass.cpp UNSUPPORTED
[libc++] Fix endianness for algorithm mismatch (#93082)
[HWASan] skip libcxx test that times out with hwasan
[libc++][TZDB] Implements zoned_traits. (#91059)
[libc++][test] Avoid `-Wunused-variable` warnings in mutex tests (#94907)
[libc++] Fix invalid escape sequences in Python comments (#94032)
[libc++][TZDB] Implements time_zone::to_local. (#91003)
[libc++][TZDB] Implements time_zone::to_sys. (#90901)
[libc++][TZDB] Implements time_zone::to_sys. (#90394)
[libc++][TZDB] Implements time_zone get_info(local_time). (#89537)
[libc++] Undeprecate shared_ptr atomic access APIs (#92920)
[libc++][regex] Correctly adjust match prefix for zero-length matches. (#94550)
[libc++][test][AIX] Only XFAIL atomic tests for before clang 19 (#94646)
[libc++] Fix naming of value template parameters (#76888)
[libc++][hardening] Finish documenting hardening. (#92021)
Fix detection of __datasizeof with Clang. (#94174)
[libc++] Fix SyntaxWarning messages from python 3.12 (#93637)
[libc++] [test] Consistently use `REQUIRES: has-unix-headers` (#94122)
[libc++] Add missing noexcept to span constructor (#94381)
Remove act from builder image. It never turned out to be useful
[libc++] Adjust XFAIL for quick_exit (#94274)
[libc++] Properly detect whether C++20 modules are supported by the compiler (#94275)
[libc++] Handle 0 size case for testing support operator new (#93834)
[libc++] Fix regression about parsing leading decimal points (#93989)
[libc++][test] Mark `optional` test functions as `TEST_CONSTEXPR_CXX20` (#94172)
[clang][Modules] Remove unnecessary includes of `Module.h` (#93417)
[libc++] Don't give functions C linkage (#94102)
[libc++] [test] Cleanup compile-only tests (#94121)
[libc++] [test] Fix `__has_include` usage, expand condvarany and spaceship coverage (#94120)
[libc++] Fix `std::atomic::wait` ulock wait UL_COMPARE_AND_WAIT64 (#92783)
Fix order of include flags for the target & regular include paths. (#93547)
[libc++] Fix failures with GCC 14 (#92663)
[libc++] Remove the inline namespace for std::filesystem in ABIv2 (#92971)
[runtimes] Correctly apply libdir subdir for multilib (#93354)
[clang] Preserve Qualifiers and type sugar in TemplateNames (#93433)
[libc++][test] Close LWG3018 and add tests (#93047)
[runtimes][CMake] Simplify the propagation of test dependencies (#93558)
[runtimes] Reintroduce a way to select the compiler used for the test suite (#93542)
[libc++] Make the __availability header a sub-header of __config (#93083)
[libc++][test] Close LWG3238 and add tests (#93043)
[libc++] LWG3223 Broken requirements for shared_ptr converting constructors (#93071)
[libc++][test] Close LWG3382 and add tests (#93039)
[libc++] [test] Fix portability issues for MSVC (#93259)
[libc++] [test] Fix MSVC warnings (#93257)
[libc++] Mark P2845R8 `__cpp_lib_format_path` and P2587R3 `__cpp_lib_to_string` as C++26 (#93255)
[libc++] Split up ABI and platform configuration to their own headers (#90863)
[libc++][pstl] Merge all frontend functions for the PSTL (#89219)
[libcxx][test][AIX] Fix the thousands_sep expectation for fr_FR locales (#92312)
[libcxx] [test] Use `shlex.quote()` to fix Python 3.13 compatibility (#93376)
[libc++] Remove libcxx/include/libcxx.imp
Revise IDE folder structure (#89755)
[libc++][test] Close LWG3045 (#93053)
[libc++] Remove a few unused includes of trivially_copyable.h (#93200)
[test][libcxx] Update deallocation after #90373 (#93145)
[libc++] Refactor tests for std::condition_variable (#91530)
Removed redundant template in '__delete_node()' member function of '__forward_list_base' and '__list_imp' classes. (#84323)
[libc++][pstl] Improve exception handling (#88998)
[WebAssembly] Upstream misc. EH changes (#92990)
[libc++] <experimental/simd> Add copy functions for class simd/simd_mask (#78935)
[libc++][vector] Inline remaining constructors filling vector with the same value (#82068)
Reland "[clang] Enable sized deallocation by default in C++14 onwards" (#90373)
[libc++] Implement C++20 atomic_ref (#76647)
[libc++] Refactor flaky tests for std::shared_lock (#91779)
[libcxx] [test] Detect mingw-w64 headers compatible with C++ module builds (#92893)
[libc++] LWG2381: Inconsistency in parsing floating point numbers (#77948)
[libcxx] removes unnecessary traits from `has_unique_object_representations` (#69241)
[libc++][z/OS] Switch to use TEST_HAS_NO_INT128 as per comment in PR 92261 (#92434)
[libcxx] Add cast to avoid pointer casting warning on Windows (#92738)
[libcxx] locale.cpp: Move build_name helper into unnamed namespace (#92461)
[libcxx][libcxxabi] Fix build for OpenBSD (#92186)
[libc++] LWG3672: `common_iterator::operator->()` should return by value (#87899)
[libc++][z/OS] Correct a definition of __native_vector_size (#91995)
[libc++][z/OS] Fixup two linear_congruential_engine tests (#92261)
[libc++][test] `__cpp_lib_within_lifetime` -> `__cpp_lib_is_within_lifetime` (#91896)
Fix typo "indicies" (#92232)
[libcxx][test] Fix numpunct grouping tests on AIX (#91781)
[libcxx] [test] Fix the locale ctype widen tests on AIX (#91744)
[libc++] Vectorize std::mismatch with trivially equality comparable types (#87716)
[libc++] Make `constexpr std::variant`. Implement P2231R1 (#83335)
[libc++][doc] Updates Spaceship status page.
[libc++][ASan] Fix std::basic_string trait type (#91590)
[libc++][test] Fixes constexpr char_traits. (#90981)
[libc++][functional] P2944R3 (partial): Comparisons for `reference_wrapper` (`reference_wrapper` operators only) (#88384)
[libc++][CI] Reenables clang-tidy. (#90077)
[libc++] Implement std::gcd using the binary version (#77747)
[ASan][libc++] Turn on ASan annotations for short strings (#79536)
[AIX][libc++] Enable clang_modules_include.gen.py tests (#90971)
[libc++] Rename _LIBCPP_INTRODUCED_foo_MARKUP to _LIBCPP_INTRODUCED_foo_ATTRIBUTE (#91269)
[libc++] Fix P1206R7 feature test macros (#90914)
[libc++] Adjust some of the [rand.dist] critical values that are too strict (#88669)
[libc++][modules] Uses _LIBCPP_USING_IF_EXISTS. (#90409)
Bump actions runner image used for libc++'s builders.
[libcxx] Align `__recommend() + 1` by __endian_factor (#90292)
[libc++] Granularize <ostream> (#85537)
[libc++] Remove a few __has_foo defines in __config (#90511)
[libc++] Remove _LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS (#90512)
[libcxx][ci] In picolib build, ask clang for the normalised triple (#90722)
[libc++][ranges] Implement LWG4053 and LWG4054 (#88612)
[libc++] Some tests are missing include for `numeric_limits` (#90345)
[libc++] Mark scoped_lock and unique_lock constructors as [[nodiscard]] (#89397)
[libc++] Improve libc++ tests when using optimizations (#88897)
[libc++][modules] Enable installation by default. (#90094)
[libc++][format] Improves escaping performance. (#88533)
[libcxx] Remove empty ~__no_destroy (#89882)
[libc++][ranges] Exports operator|. (#90071)
[C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (#89446)
[libc++][ranges] LWG3984: ranges::to's recursion branch may be ill-formed (#87964)
[clang] Enable sized deallocation by default in C++14 onwards (#83774)
[libc++][format] Improves escaping. (#88283)
[libc++] Implement LWG4023 (#87513)
[libc++] Reformulate availability in terms of LLVM releases (#87563)
[libc++] Reorganize the std::variant macros (#89419)
[libc++][format] Adds an escaped output benchmark. (#88020)
[libc++] Makes saturation functions privately available. (#89503)
[libcxx] [modules] Add _LIBCPP_USING_IF_EXISTS on aligned_alloc (#89827)
[libc++][TZDB] Fixes reverse time lookups. (#89502)
[libc++][doc] Updates module build instructions. (#89413)
[libc++][chrono] Fixes format output of negative values. (#89408)
[libc++][ranges] export `std::ranges::range_adaptor_closure` (#89793)
[libc++][ranges] P2387R3: Pipe support for user-defined range adaptors (#89148)
[libc++] Add some private headers to libcxx.imp (#89568)
[libc++] Remove _LIBCPP_DISABLE_NODISCARD_EXTENSIONS and refactor the tests (#87094)
[libc++] Remove stray CMake install step for modulemap file (#89394)
[libc++] Don't commit libcxx.imp (#89391)
[libc++] Removes a Clang 16 Windows workaround. (#88560)
[libc++][TZDB] Renames incomplete. (#89250)
[libc++] Optimize char_traits a bit (#72799)
[libc++] Fix usage of 'exclude_from_explicit_instantiation' attribute on local class members (#89377)
linear_congruential_engine: add using more precision to prevent overflow (#81583)
CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (#89234)
[libc++][TZDB] Adds local_info formatter. (#86256)
[libc++][pstl] Move the CPU algorithm implementations to __pstl (#89109)
[libc++][TZDB] Adds sys_info formatter. (#85896)
[libc++][pstl] Promote CPU backends to top-level backends (#88968)
[libc++][chrono] Improves date formatting. (#86127)
[libc++] Add missing iterator requirement checks in the PSTL (#88127)
[libc++][TZDB] Improves time zone format specifiers. (#85797)
[libc++][chrono] Disables a test.
[libc++][doc] Documents -DLIBCXX_INSTALL_MODULES=ON. (#88547)
[libc++][test] Removes Clang 16 validation. (#88558)
[libc++] Removes deprecated _LIBCPP_ENABLE_<VERSION>_REMOVED_FEATURES macros (#88548)
[libc++][modules] Removes some validation quirks. (#88031)
[libc++] Deprecate the C++20 synchronization library before C++20 (#86410)
[libc++] Use availability to rely on key functions for bad_expected_access and bad_function_call (#87390)
[libc++] Rename __cpu_traits functions (#88741)
[libc++][CI] Tests LLDB libc++ data formatters. (#88312)
[libc++] Add a utility to check whether a range is valid (#87665)
[libc++][PSTL] Introduce cpu traits (#88134)
[libc++][RFC] Only include what is required by-version in the umbrella headers (#83740)
[libc++] Deprecated `shared_ptr` Atomic Access APIs as per P0718R2 & Implemented P2869R3: Remove Deprecated `shared_ptr` Atomic Access APIs from C++26 (#87111)
[libc++][TZDB] Removes test_indian_kerguelen test.
[libc++][TZDZ] Validates the database version.
[libc++] Undeprecate POSIX STREAM macros. (#88296)
[libc++] Marks a variable const. (#88562)
[libc++][CMake] Removes LIBCXX_ENABLE_CLANG_TIDY. (#85794)
[tzdb] Replace shared_mutex with mutex. (#87929)
[libc++] P3029R1: Better `mdspan`'s CTAD (#87873)
[libc++][ranges] LWG3736: move_iterator missing disable_sized_sentinel_for specialization (#85611)
[libc++] LWG3643: Missing `constexpr` in `std::counted_iterator` (#87901)
[libcxx] applies changes regarding post-commit feedback to #75259 (#76534)
[libc++] Fix -Wgnu-include-next in stddef.h (#88214)
[libcxx] Use generic builtins for popcount, clz and ctz (#86563)
[libc++] Adds a global private constructor tag. (#87920)
[libc++] Removes Clang-16 support. (#87810)
[lib++][CI] Changes bootstrap build type. (#88175)
[libc++][CI] Updates Docker LLDB dependencies. (#88174)
[libc++][chrono] Adds the sys_info class. (#85619)
[libc++][format] Switches to Unicode 15.1. (#86543)
[libc++] Avoids using ENODATA. (#86165)
[libc++][TZDB] Fixes relative path resolving. (#87882)
[libc++][format] adds a basic fuzzer test. (#87883)
[libc++] Add test coverage for our implementation of LWG4031 (#87508)
[libc++] Implement `bind_back` (#81055)
[libc++][format] Fixed `println.blank_line.sh.cpp` test on llvm-clang-win-x-* configurations (#88011)
[libc++][doc] Updates format status page.
[libc++][format] P3142R0: Printing Blank Lines with `println` (#87277)
[libc++] Optimize ranges::minmax (#87335)
[libc++] Implement LWG3430 disallow implicit conversion of the source arguments to `std::filesystem::path` when constructing `std::basic_*fstream` (#85079)
[libc++] P2872R3: Remove ``wstring_convert`` From C++26 (#87100)
Fix issue with never-constexpr __construct_at in C++ < 20. (#87403)
[libcxx] coerce formatter precision to int (#87738)
[libc++][CI] Updates to Clang 19. (#85301)
[libc++][chrono] Completes the tzdb class. (#82157)
[libc++][oss-fuzz] Updates C++ version used. (#87531)
[libc++] P2867R1: Remove Deprecated `strstream`s From C++26 (#87107)
[libc++] Fix copy/pasta error in atomic tests for `atomic_compare_exchange_{weak,strong}` (#87135)
[libc++] Mark some recent LWG issues and papers as done (#87502)
[libc++][chrono] Loads leap-seconds.list in tzdb. (#82113)
[libc++] Disables -Wweak-vtables diagnostics. (#85577)
[libc++] Update status page after the Tokyo meeting (#87395)
[libc++] Upstream ptrauth support in libc++ and libc++abi (#84573)
[libc++] Fix tests on musl (#85085) (#86934)
[libc++] Add a static_assert for a Mandates in seed_seq (#86992)
[libc++][ranges] Avoid using `distance` in `ranges::contains_subrange` (#87155)
[libc++] `std::ranges::advance`: avoid unneeded bounds checks when advancing iterator (#84126)
```
{% endcut %}
commit_hash:45feb9db5b173f12bf29de2a3ee73006d4371a4e
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/unordered_map')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/unordered_map | 92 |
1 files changed, 36 insertions, 56 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/unordered_map b/contrib/libs/cxxsupp/libcxx/include/unordered_map index ca3d1a80bd5..7c31c4fce26 100644 --- a/contrib/libs/cxxsupp/libcxx/include/unordered_map +++ b/contrib/libs/cxxsupp/libcxx/include/unordered_map @@ -585,7 +585,6 @@ template <class Key, class T, class Hash, class Pred, class Alloc> #include <__algorithm/is_permutation.h> #include <__assert> -#include <__availability> #include <__config> #include <__functional/is_transparent.h> #include <__functional/operations.h> @@ -651,7 +650,7 @@ public: return static_cast<const _Hash&>(*this)(__x); } #endif - _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hash>) { using std::swap; swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y)); } @@ -675,7 +674,7 @@ public: return __hash_(__x); } #endif - _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hash>) { using std::swap; swap(__hash_, __y.__hash_); } @@ -726,7 +725,7 @@ public: return static_cast<const _Pred&>(*this)(__x, __y); } #endif - _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Pred>) { using std::swap; swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y)); } @@ -769,7 +768,7 @@ public: return __pred_(__x, __y); } #endif - _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Pred>) { using std::swap; swap(__pred_, __y.__pred_); } @@ -793,12 +792,12 @@ public: private: allocator_type& __na_; - __hash_map_node_destructor& operator=(const __hash_map_node_destructor&); - public: bool __first_constructed; bool __second_constructed; + __hash_map_node_destructor& operator=(const __hash_map_node_destructor&) = delete; + _LIBCPP_HIDE_FROM_ABI explicit __hash_map_node_destructor(allocator_type& __na) _NOEXCEPT : __na_(__na), __first_constructed(false), @@ -883,7 +882,6 @@ public: return *this; } -private: __hash_value_type(const __hash_value_type& __v) = delete; __hash_value_type(__hash_value_type&& __v) = delete; template <class... _Args> @@ -907,8 +905,7 @@ public: _LIBCPP_HIDE_FROM_ABI value_type& __get_value() { return __cc_; } _LIBCPP_HIDE_FROM_ABI const value_type& __get_value() const { return __cc_; } -private: - ~__hash_value_type(); + ~__hash_value_type() = delete; }; #endif @@ -1037,7 +1034,7 @@ public: typedef pair<const key_type, mapped_type> value_type; typedef value_type& reference; typedef const value_type& const_reference; - static_assert((is_same<value_type, typename allocator_type::value_type>::value), + static_assert(is_same<value_type, typename allocator_type::value_type>::value, "Allocator::value_type must be same type as value_type"); private: @@ -1060,12 +1057,10 @@ private: typedef unique_ptr<__node, _Dp> __node_holder; typedef allocator_traits<allocator_type> __alloc_traits; - static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value, - "[allocator.requirements] states that rebinding an allocator to the same type should result in the " - "original allocator"); + static_assert(__check_valid_allocator<allocator_type>::value, ""); - static_assert((is_same<typename __table::__container_value_type, value_type>::value), ""); - static_assert((is_same<typename __table::__node_value_type, __value_type>::value), ""); + static_assert(is_same<typename __table::__container_value_type, value_type>::value, ""); + static_assert(is_same<typename __table::__node_value_type, __value_type>::value, ""); public: typedef typename __alloc_traits::pointer pointer; @@ -1207,7 +1202,7 @@ public: return allocator_type(__table_.__node_alloc()); } - _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __table_.size() == 0; } + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __table_.size() == 0; } _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __table_.size(); } _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return __table_.max_size(); } @@ -1374,7 +1369,7 @@ public: } #endif - _LIBCPP_HIDE_FROM_ABI void swap(unordered_map& __u) _NOEXCEPT_(__is_nothrow_swappable<__table>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(unordered_map& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) { __table_.swap(__u.__table_); } @@ -1384,13 +1379,11 @@ public: _LIBCPP_HIDE_FROM_ABI iterator find(const key_type& __k) { return __table_.find(__k); } _LIBCPP_HIDE_FROM_ABI const_iterator find(const key_type& __k) const { return __table_.find(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI iterator find(const _K2& __k) { return __table_.find(__k); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI const_iterator find(const _K2& __k) const { return __table_.find(__k); } @@ -1398,8 +1391,7 @@ public: _LIBCPP_HIDE_FROM_ABI size_type count(const key_type& __k) const { return __table_.__count_unique(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI size_type count(const _K2& __k) const { return __table_.__count_unique(__k); } @@ -1408,8 +1400,7 @@ public: #if _LIBCPP_STD_VER >= 20 _LIBCPP_HIDE_FROM_ABI bool contains(const key_type& __k) const { return find(__k) != end(); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI bool contains(const _K2& __k) const { return find(__k) != end(); } @@ -1422,13 +1413,11 @@ public: return __table_.__equal_range_unique(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range(const _K2& __k) { return __table_.__equal_range_unique(__k); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range(const _K2& __k) const { return __table_.__equal_range_unique(__k); } @@ -1848,7 +1837,8 @@ public: typedef pair<const key_type, mapped_type> value_type; typedef value_type& reference; typedef const value_type& const_reference; - static_assert((is_same<value_type, typename allocator_type::value_type>::value), + static_assert(__check_valid_allocator<allocator_type>::value, ""); + static_assert(is_same<value_type, typename allocator_type::value_type>::value, "Allocator::value_type must be same type as value_type"); private: @@ -1868,13 +1858,9 @@ private: typedef __hash_map_node_destructor<__node_allocator> _Dp; typedef unique_ptr<__node, _Dp> __node_holder; typedef allocator_traits<allocator_type> __alloc_traits; - static_assert((is_same<typename __node_traits::size_type, typename __alloc_traits::size_type>::value), + static_assert(is_same<typename __node_traits::size_type, typename __alloc_traits::size_type>::value, "Allocator uses different size_type for different types"); - static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value, - "[allocator.requirements] states that rebinding an allocator to the same type should result in the " - "original allocator"); - public: typedef typename __alloc_traits::pointer pointer; typedef typename __alloc_traits::const_pointer const_pointer; @@ -2015,7 +2001,7 @@ public: return allocator_type(__table_.__node_alloc()); } - _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __table_.size() == 0; } + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT { return __table_.size() == 0; } _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT { return __table_.size(); } _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT { return __table_.max_size(); } @@ -2125,7 +2111,7 @@ public: } #endif - _LIBCPP_HIDE_FROM_ABI void swap(unordered_multimap& __u) _NOEXCEPT_(__is_nothrow_swappable<__table>::value) { + _LIBCPP_HIDE_FROM_ABI void swap(unordered_multimap& __u) _NOEXCEPT_(__is_nothrow_swappable_v<__table>) { __table_.swap(__u.__table_); } @@ -2135,13 +2121,11 @@ public: _LIBCPP_HIDE_FROM_ABI iterator find(const key_type& __k) { return __table_.find(__k); } _LIBCPP_HIDE_FROM_ABI const_iterator find(const key_type& __k) const { return __table_.find(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI iterator find(const _K2& __k) { return __table_.find(__k); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI const_iterator find(const _K2& __k) const { return __table_.find(__k); } @@ -2149,8 +2133,7 @@ public: _LIBCPP_HIDE_FROM_ABI size_type count(const key_type& __k) const { return __table_.__count_multi(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI size_type count(const _K2& __k) const { return __table_.__count_multi(__k); } @@ -2159,8 +2142,7 @@ public: #if _LIBCPP_STD_VER >= 20 _LIBCPP_HIDE_FROM_ABI bool contains(const key_type& __k) const { return find(__k) != end(); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI bool contains(const _K2& __k) const { return find(__k) != end(); } @@ -2173,13 +2155,11 @@ public: return __table_.__equal_range_multi(__k); } #if _LIBCPP_STD_VER >= 20 - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range(const _K2& __k) { return __table_.__equal_range_multi(__k); } - template <class _K2, - enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr> + template <class _K2, enable_if_t<__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr> _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range(const _K2& __k) const { return __table_.__equal_range_multi(__k); } @@ -2254,12 +2234,12 @@ template <class _Key, class = enable_if_t<!is_integral<_Hash>::value>, class = enable_if_t<!__is_allocator<_Pred>::value>, class = enable_if_t<__is_allocator<_Allocator>::value>> -unordered_multimap(initializer_list<pair<_Key, _Tp>>, - typename allocator_traits<_Allocator>::size_type = 0, - _Hash = _Hash(), - _Pred = _Pred(), - _Allocator = _Allocator()) - -> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>; +unordered_multimap( + initializer_list<pair<_Key, _Tp>>, + typename allocator_traits<_Allocator>::size_type = 0, + _Hash = _Hash(), + _Pred = _Pred(), + _Allocator = _Allocator()) -> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>; template <class _InputIterator, class _Allocator, |