45 #ifndef CUSTOM_MAP_HPP 46 #define CUSTOM_MAP_HPP 49 #include "config_HAVE_UNORDERED.hpp" 52 #include <unordered_map> 54 template <
class T,
class U,
class Hash = std::hash<T>,
class Eq = std::equal_to<T>,
55 class Alloc = std::allocator<std::pair<const T, U>>>
58 template <
typename _Key,
typename _Tp,
typename _Compare = std::less<_Key>,
59 typename _Alloc = std::allocator<std::pair<const _Key, _Tp>>>
62 #if !defined(__clang__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 8) 63 #ifndef NO_ABSEIL_HASH 64 #define NO_ABSEIL_HASH 1 69 template <
class T,
class U,
class _Hash = std::hash<T>,
class _Eq = std::equal_to<T>,
70 class _Alloc = std::allocator<std::pair<const T, U>>>
73 template <
class T,
class U,
class _Hash = std::hash<T>,
class _Eq = std::equal_to<T>,
74 class _Alloc = std::allocator<std::pair<const T, U>>>
77 template <
class T,
class U,
class _Hash = std::hash<T>,
class _Eq = std::equal_to<T>,
78 class _Alloc = std::allocator<std::pair<const T, U>>>
81 template <
typename _Key,
typename _Tp,
typename _Compare = std::less<_Key>,
82 typename _Alloc = std::allocator<std::pair<const _Key, _Tp>>>
86 template <
typename T,
typename U>
89 template <
typename T,
typename U>
94 #ifndef NO_ABSEIL_HASH 95 #define NO_ABSEIL_HASH 0 98 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 99 #pragma GCC diagnostic push 100 #pragma GCC diagnostic ignored "-Wsign-conversion" 101 #pragma GCC diagnostic ignored "-Wconversion" 102 #pragma GCC diagnostic ignored "-Wpedantic" 103 #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 104 #pragma GCC diagnostic ignored "-Woverflow" 105 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" 106 #pragma GCC diagnostic ignored "-Wstrict-overflow" 107 #if __GNUC__ == 4 && __GNUC_MINOR__ == 8 108 #pragma GCC diagnostic ignored "-Wshadow" 109 #pragma GCC diagnostic ignored "-Wundef" 110 #pragma GCC diagnostic ignored "-Weffc++" 111 #ifndef __cpp_constexpr 112 #define __cpp_constexpr 200704 116 #pragma GCC diagnostic warning "-Wsign-conversion" 117 #pragma GCC diagnostic warning "-Wconversion" 118 #pragma GCC diagnostic warning "-Wpedantic" 119 #pragma GCC diagnostic warning "-Wctor-dtor-privacy" 120 #pragma GCC diagnostic warning "-Woverflow" 121 #pragma GCC diagnostic warning "-Wzero-as-null-pointer-constant" 124 #if defined(__clang__) 125 #pragma clang diagnostic push 126 #pragma clang diagnostic ignored "-Wsign-conversion" 127 #pragma clang diagnostic ignored "-Wconversion" 128 #pragma clang diagnostic ignored "-Wdouble-promotion" 129 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" 130 #pragma clang diagnostic ignored "-Wextra-semi" 133 #include "absl/container/btree_map.h" 134 #include "absl/container/flat_hash_map.h" 135 #include "absl/container/node_hash_map.h" 136 #include "absl/hash/hash.h" 139 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 140 #pragma GCC diagnostic pop 142 #if defined(__clang__) 143 #pragma clang diagnostic pop 146 template <class T, class U, class Hash = typename absl::flat_hash_map<T, U>::hasher,
147 class Eq =
typename absl::flat_hash_map<T, U>::key_equal,
class Alloc = std::allocator<std::pair<const T, U>>>
150 template <class T, class U, class Hash = typename absl::flat_hash_map<T, U>::hasher,
151 class Eq =
typename absl::flat_hash_map<T, U>::key_equal,
class Alloc = std::allocator<std::pair<const T, U>>>
154 template <class T, class U, class Hash = typename absl::flat_hash_map<T, U>::hasher,
155 class Eq =
typename absl::flat_hash_map<T, U>::key_equal,
class Alloc = std::allocator<std::pair<const T, U>>>
158 template <
typename T,
typename U,
typename Compare = std::less<T>,
159 typename Alloc = std::allocator<std::pair<const T, U>>>
163 template <
typename T,
typename U>
166 template <
typename T,
typename U>
absl::btree_map< T, U, Compare, Alloc > CustomOrderedMap
CustomOrderedMap< T, U > CustomMap
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapUnstable
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
std::map< _Key, _Tp, _Compare, _Alloc > OrderedMapStd
std::unordered_map< T, U, Hash, Eq, Alloc > UnorderedMapStd
Autoheader include.
absl::node_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapStable