Loading...
Searching...
No Matches
HashMap.hpp
1#pragma once
2#include <score/serialization/IsTemplate.hpp>
3
4#include <ossia/detail/config.hpp>
5
6#include <ossia/detail/hash_map.hpp>
7namespace score
8{
9template <
10 class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>,
11 class AllocatorOrContainer = std::allocator<std::pair<Key, T>>>
12using hash_map = ossia::hash_map<Key, T, Hash, KeyEqual, AllocatorOrContainer>;
13
14template <typename Map>
15void optimize_hash_map(Map& map)
16{
17 map.max_load_factor(0.1f);
18 map.reserve(map.size());
19}
20}
21
22template <typename T, typename U>
23struct is_template<ossia::hash_map<T, U>> : std::true_type
24{
25};
Base toolkit upon which the software is built.
Definition Application.cpp:90