Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 308
TZHX Avatar asked Nov 26 '10 17:11

TZHX


2 Answers

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

like image 81
Daniel Lidström Avatar answered Nov 03 '22 10:11

Daniel Lidström


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

like image 39
T33C Avatar answered Nov 03 '22 10:11

T33C