My Project
containers.h
1 #ifndef H_CONTAINERS_INCLUDED
2 #define H_CONTAINERS_INCLUDED
3 
4 #include <boost/container/flat_map.hpp>
5 #include <boost/container/small_vector.hpp>
6 
7 using boost::container::flat_map;
8 using boost::container::small_vector;
9 template <typename K, typename V,
10  typename AC = std::allocator<typename flat_map<K, V>::value_type>>
11 using tmap = flat_map<K, V, std::less<>, AC>;
12 
13 template <typename K, typename V, std::size_t N = 4>
14 using vmap = flat_map<K, V, std::less<>, small_vector<std::pair<K, V>, N>>;
15 
16 template <typename K, typename V, typename C, std::size_t N = 4>
17 using vmapc = flat_map<K, V, C, small_vector<std::pair<K, V>, N>>;
18 
19 #endif