40 #ifndef CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ 41 #define CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ 43 #include "cereal/cereal.hpp" 48 template <
class Archive,
template <
typename...>
class Map,
typename... Args,
typename =
typename Map<Args...>::mapped_type>
inline 51 ar( make_size_tag( static_cast<size_type>(map.size()) ) );
53 for(
const auto & i : map )
54 ar( make_map_item(i.first, i.second) );
58 template <
class Archive,
template <
typename...>
class Map,
typename... Args,
typename =
typename Map<Args...>::mapped_type>
inline 62 ar( make_size_tag( size ) );
66 auto hint = map.begin();
67 for(
size_t i = 0; i < size; ++i )
69 typename Map<Args...>::key_type key;
70 typename Map<Args...>::mapped_type value;
72 ar( make_map_item(key, value) );
73 #ifdef CEREAL_OLDER_GCC 74 hint = map.insert( hint, std::make_pair(std::move(key), std::move(value)) );
75 #else // NOT CEREAL_OLDER_GCC 76 hint = map.emplace_hint( hint, std::move( key ), std::move( value ) );
77 #endif // NOT CEREAL_OLDER_GCC 82 #endif // CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ void CEREAL_LOAD_FUNCTION_NAME(Archive &ar, Map< Args... > &map)
Loading for std-like pair associative containers.
void CEREAL_SAVE_FUNCTION_NAME(Archive &ar, Map< Args... > const &map)
Saving for std-like pair associative containers.