Skip to content

Commit

Permalink
unordered_{map,set} serialization supports non-default template argum…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
mrzv committed Jul 13, 2016
1 parent 684b200 commit 4ce891d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/diy/serialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ namespace diy

#ifndef BUILD_GYP // C++11 does not work right in my nwjs- and node-gyp builds--TP
#if __cplusplus > 199711L // C++11
// save/load for std::unordered_map<K,V>
template<class K, class V>
struct Serialization< std::unordered_map<K,V> >
// save/load for std::unordered_map<K,V,H,E,A>
template<class K, class V, class H, class E, class A>
struct Serialization< std::unordered_map<K,V,H,E,A> >
{
typedef std::unordered_map<K,V> Map;
typedef std::unordered_map<K,V,H,E,A> Map;

static void save(BinaryBuffer& bb, const Map& m)
{
Expand All @@ -363,11 +363,11 @@ namespace diy
}
};

// save/load for std::unordered_set<T>
template<class T>
struct Serialization< std::unordered_set<T> >
// save/load for std::unordered_set<T,H,E,A>
template<class T, class H, class E, class A>
struct Serialization< std::unordered_set<T,H,E,A> >
{
typedef std::unordered_set<T> Set;
typedef std::unordered_set<T,H,E,A> Set;

static void save(BinaryBuffer& bb, const Set& m)
{
Expand Down

0 comments on commit 4ce891d

Please sign in to comment.