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)) );
67 hint = map.emplace_hint( hint, std::move( key ), std::move( value ) );
Main cereal functionality.
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:385
CEREAL_SIZE_TYPE size_type
The size type used by cereal.
Definition: helpers.hpp:61
#define CEREAL_LOAD_FUNCTION_NAME
The deserialization (load) function name to search for.
Definition: macros.hpp:85
#define CEREAL_SAVE_FUNCTION_NAME
The serialization (save) function name to search for.
Definition: macros.hpp:92