Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions msgpack/include/msgpack/msgpack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ struct is_container<std::map<T, Alloc> > {
static const bool value = true;
};

template<class T, class Alloc>
struct is_container<std::multimap<T, Alloc> > {
static const bool value = true;
};

template<class T, class Alloc>
struct is_container<std::unordered_map<T, Alloc> > {
static const bool value = true;
Expand Down Expand Up @@ -140,6 +145,11 @@ struct is_map<std::map<T, Alloc> > {
static const bool value = true;
};

template<class T, class Alloc>
struct is_map<std::multimap<T, Alloc> > {
static const bool value = true;
};

template<class T, class Alloc>
struct is_map<std::unordered_map<T, Alloc> > {
static const bool value = true;
Expand Down Expand Up @@ -637,7 +647,7 @@ class Unpacker {
MappedType value{};
unpack_type(key);
unpack_type(value);
map.insert_or_assign(key, value);
map.emplace(key, value);
}
} else if (safe_data() == map16) {
safe_increment();
Expand All @@ -651,7 +661,7 @@ class Unpacker {
MappedType value{};
unpack_type(key);
unpack_type(value);
map.insert_or_assign(key, value);
map.emplace(key, value);
}
} else {
std::size_t map_size = safe_data() & 0b00001111;
Expand All @@ -661,7 +671,7 @@ class Unpacker {
MappedType value{};
unpack_type(key);
unpack_type(value);
map.insert_or_assign(key, value);
map.emplace(key, value);
}
}
}
Expand Down
Loading