31 #ifndef CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ 32 #define CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ 39 template <
class Archive,
template <
typename...>
class Map,
typename... Args,
typename =
typename Map<Args...>::mapped_type>
inline 42 ar( make_size_tag( static_cast<size_type>(map.size()) ) );
44 for(
const auto & i : map )
49 template <
class Archive,
template <
typename...>
class Map,
typename... Args,
typename =
typename Map<Args...>::mapped_type>
inline 53 ar( make_size_tag( size ) );
57 auto hint = map.begin();
58 for(
size_t i = 0; i < size; ++i )
60 typename Map<Args...>::key_type key;
61 typename Map<Args...>::mapped_type value;
64 #ifdef CEREAL_OLDER_GCC 65 hint = map.insert( hint, std::make_pair(std::move(key), std::move(value)) );
66 #else // NOT CEREAL_OLDER_GCC 67 hint = map.emplace_hint( hint, std::move( key ), std::move( value ) );
68 #endif // NOT CEREAL_OLDER_GCC 73 #endif // CEREAL_CONCEPTS_PAIR_ASSOCIATIVE_CONTAINER_HPP_ MapItem< KeyType, ValueType > make_map_item(KeyType &&key, ValueType &&value)
Create a MapItem so that human readable archives will group keys and values together.
Definition: helpers.hpp:346
Definition: access.hpp:40
Main cereal functionality.
#define CEREAL_LOAD_FUNCTION_NAME
The deserialization (load) function name to search for.
Definition: macros.hpp:85
CEREAL_SIZE_TYPE size_type
The size type used by cereal.
Definition: helpers.hpp:61
#define CEREAL_SAVE_FUNCTION_NAME
The serialization (save) function name to search for.
Definition: macros.hpp:92