问题
Does boost support serialization of c++11's std::tuple?
I couldn't find a tuple.hpp header file at /boost/serialization/
I'm using boost 1.52.0 (happy to upgrade if need be, but it seems like the changes in version 1.53 doesn't have anything related to this).
回答1:
Out of the box, no. You'll have to write the serializer yourself. Luckily, someone already did:
C++0x tuple boost serialization (also in github)
回答2:
and here is another implementation:
https://github.com/galaxyeye/atlas/blob/master/atlas/serialization/tuple.h
with the test code :
https://github.com/galaxyeye/atlas/blob/master/libs/serialization/test/tuple.cpp
enjoy :)
来源:https://stackoverflow.com/questions/14744303/does-boost-support-serialization-of-c11s-stdtuple