Skip to content

Instantly share code, notes, and snippets.

@Lazin
Created June 11, 2014 19:28
Show Gist options
  • Save Lazin/e731baee468ed01d4050 to your computer and use it in GitHub Desktop.
Save Lazin/e731baee468ed01d4050 to your computer and use it in GitHub Desktop.
template<typename T>
struct serializer<
type_prop::not_a_pod,
ser_method::use_internal_serializer,
archive_type::binary,
direction::in,
std::list<T>
> {
template<typename Archive>
static Archive& apply(Archive& ar, std::list<T>& list) {
std::uint32_t size = 0;
ar.read(size);
list.resize(size);
for ( auto &it: list) {
ar & it;
}
return ar;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment