TZHX
TZHX

Reputation: 5377

boost::serialization of boost::unordered_map

I've moved one of my member variables from a std::map to a boost::unordered_map for the performance benefits on insertion. However, this has broken my use of boost serialization for export/importing from an archive.

I've tried looking but can't find it anyway, I was wondering if there was a header I could include that would provide serialization to this class?

Many thanks.

Upvotes: 13

Views: 4810

Answers (2)

Daniel Lidström
Daniel Lidström

Reputation: 10260

Have a look at unordered_map_serialization.h in my distributed opening book learning project. It should be what you're looking for.

Upvotes: 10

T33C
T33C

Reputation: 4429

I saw someone replaced map with unordered_map in serialization/map.hpp and this worked

Upvotes: 2

Related Questions