16#include <unordered_map>
23 template<
typename Key,
typename T,
typename Compare = std::less<>,
typename RawAllocator = DefaultAllocator>
24 using Map = std::map<Key, T, Compare, ScopedAllocatorAdaptor<StdAllocator<Pair<const Key, T>,
RawAllocator>>>;
32 template<
typename Key,
typename T,
typename Hash = std::hash<Key>,
typename KeyEqual = std::equal_to<>,
typename RawAllocator = DefaultAllocator>
33 using HashMap = std::unordered_map<Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor<StdAllocator<Pair<const Key, T>,
RawAllocator>>>;
36 template<
typename Key,
typename T,
typename Hash = std::hash<Key>,
typename KeyEqual = std::equal_to<>>
40template<
typename Key,
typename T,
typename Compare,
typename RawAllocator>
struct std::hash<
CeresEngine::Map<Key, T, Compare, RawAllocator>> {
42 inline size_t operator()(
const Type&
object)
const noexcept {
44 for(
const auto& value : object) {
51template<
typename Key,
typename T,
typename Hash,
typename KeyEqual,
typename RawAllocator>
54 inline size_t operator()(
const Type&
object)
const noexcept {
56 for(
const auto& value : object) {
Definition Application.hpp:19
constexpr void combine(std::size_t &seed, const T &v)
Generates a new hash for the provided type using the default standard hasher and combines it with a p...
Definition Hash.hpp:32
std::unordered_map< Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > HashMap
HashMap is an associative container that contains key-value pairs with unique keys.
Definition Map.hpp:33
HashMap< Key, T, Hash, KeyEqual, TemporaryAllocator > TemporaryHashMap
A special HashMap that uses a fast temporary allocator.
Definition Map.hpp:37
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::map< Key, T, Compare, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > Map
Map is a sorted associative container that contains key-value pairs with unique keys.
Definition Map.hpp:24
Map< Key, T, Compare, TemporaryAllocator > TemporaryMap
A special Map that uses a fast temporary allocator.
Definition Map.hpp:27