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>
7 namespace score
8 {
9 template <
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>>>
12 using hash_map = ossia::hash_map<Key, T, Hash, KeyEqual, AllocatorOrContainer>;
13 
14 template <typename Map>
15 void optimize_hash_map(Map& map)
16 {
17  map.max_load_factor(0.1f);
18  map.reserve(map.size());
19 }
20 }
21 
22 template <typename T, typename U>
23 struct is_template<ossia::hash_map<T, U>> : std::true_type
24 {
25 };
Base toolkit upon which the software is built.
Definition: Application.cpp:90