11 #ifndef __UNORDERED_MAP_SUPPORT_HEADER
12 #define __UNORDERED_MAP_SUPPORT_HEADER
14 #include <unordered_map>
21 template<
typename K,
typename V,
typename S>
22 S & operator<<(S & os, std::unordered_map<K, V>
const & arg) {
25 std::for_each(arg.begin(), arg.end(),
26 [&](std::pair<K const, V>
const &
p) {
27 os <<
"{" <<
p.first <<
": " <<
p.second <<
"}";
36 template<
typename K,
typename V,
typename Archive>
37 void serialize(Archive & ar, std::unordered_map<K, V> & arg) {
39 size_type size_ = arg.size();
49 for(
int i = keys.size() - 1;
i >= 0; --
i) {
50 arg[keys[
i]] = vals[
i];
55 std::for_each(arg.begin(), arg.end(),
56 [&](std::pair<K const, V>
const &
p) {
61 std::for_each(arg.begin(), arg.end(),
62 [&](std::pair<K const, V>
const &
p) {
69 #endif //__UNORDERED_MAP_SUPPORT_HEADER
void serialize(Archive &ar, T &t)
Definition: serializer.hpp:95
uint16_t size_type
Definition: vector.hpp:24
key
Definition: hid_keys.hpp:14