#pragma once #include #include #include "common/common_types.h" namespace boost::serialization { template void save(Archive& ar, const boost::container::flat_set& set, const unsigned int file_version) { ar << static_cast(set.size()); for (auto& v : set) { ar << v; } } template void load(Archive& ar, boost::container::flat_set& set, const unsigned int file_version) { u64 count{}; ar >> count; set.clear(); for (u64 i = 0; i < count; i++) { T value{}; ar >> value; set.insert(value); } } template void serialize(Archive& ar, boost::container::flat_set& set, const unsigned int file_version) { boost::serialization::split_free(ar, set, file_version); } } // namespace boost::serialization