30#ifndef CEREAL_TYPES_SET_HPP_
31#define CEREAL_TYPES_SET_HPP_
41 template <
class Archive,
class SetT>
inline
42 void save( Archive & ar, SetT
const & set )
44 ar( make_size_tag(
static_cast<size_type>(set.size()) ) );
46 for(
const auto & i : set )
51 template <
class Archive,
class SetT>
inline
52 void load( Archive & ar, SetT & set )
55 ar( make_size_tag( size ) );
59 auto hint = set.begin();
60 for( size_type i = 0; i < size; ++i )
62 typename SetT::key_type key;
65 #ifdef CEREAL_OLDER_GCC
66 hint = set.insert( hint, std::move( key ) );
68 hint = set.emplace_hint( hint, std::move( key ) );
75 template <
class Archive,
class K,
class C,
class A>
inline
78 set_detail::save( ar, set );
82 template <
class Archive,
class K,
class C,
class A>
inline
85 set_detail::load( ar, set );
89 template <
class Archive,
class K,
class C,
class A>
inline
92 set_detail::save( ar, multiset );
96 template <
class Archive,
class K,
class C,
class A>
inline
99 set_detail::load( ar, multiset );
Main cereal functionality.
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