2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
11 #define _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
14 experimental/unordered_map synopsis
18 namespace experimental {
19 inline namespace fundamentals_v1 {
22 template <class Key, class T,
23 class Hash = hash<Key>,
24 class Pred = equal_to<Key>>
26 std::unordered_map<Key, T, Hash, Pred,
27 polymorphic_allocator<pair<const Key,T>>>;
29 template <class Key, class T,
30 class Hash = hash<Key>,
31 class Pred = equal_to<Key>>
32 using unordered_multimap =
33 std::unordered_multimap<Key, T, Hash, Pred,
34 polymorphic_allocator<pair<const Key,T>>>;
37 } // namespace fundamentals_v1
38 } // namespace experimental
43 #include <__assert> // all public C++ headers provide the assertion handler
44 #include <experimental/__config>
45 #include <experimental/memory_resource>
46 #include <unordered_map>
48 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
49 # pragma GCC system_header
52 _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
54 #ifndef _LIBCPP_CXX03_LANG
56 template <class _Key, class _Value,
57 class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
58 using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
59 polymorphic_allocator<pair<const _Key, _Value>>>;
61 template <class _Key, class _Value,
62 class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
63 using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
64 polymorphic_allocator<pair<const _Key, _Value>>>;
66 #endif // _LIBCPP_CXX03_LANG
68 _LIBCPP_END_NAMESPACE_LFTS_PMR
70 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
74 # include <functional>
78 #endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_MAP */