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 ) );
67 #else // NOT CEREAL_OLDER_GCC
68 hint = set.emplace_hint( hint, std::move( key ) );
69 #endif // NOT CEREAL_OLDER_GCC
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 );
103 #endif // CEREAL_TYPES_SET_HPP_