6 #ifndef TURI_SERIALIZE_MAP_HPP 7 #define TURI_SERIALIZE_MAP_HPP 10 #include <core/storage/serialization/iarchive.hpp> 11 #include <core/storage/serialization/oarchive.hpp> 12 #include <core/storage/serialization/iterator.hpp> 16 namespace archive_detail {
18 template <
typename OutArcType,
typename T,
typename U>
19 struct serialize_impl<OutArcType,
std::map<T,U>, false > {
20 static void exec(OutArcType& oarc,
const std::map<T,U>& vec){
22 vec.begin(), vec.end(), vec.size());
28 template <
typename InArcType,
typename T,
typename U>
29 struct deserialize_impl<InArcType,
std::map<T,U>, false > {
30 static void exec(InArcType& iarc, std::map<T,U>& vec){
33 std::pair<T,U> >(iarc,
34 std::inserter(vec,vec.end()));
void serialize_iterator(OutArcType &oarc, RandomAccessIterator begin, RandomAccessIterator end)
Serializes the contents between the iterators begin and end.
void deserialize_iterator(InArcType &iarc, OutputIterator result)
The accompanying function to serialize_iterator() Reads elements from the stream and writes it to the...