Specifies the requirements for types that are serialisable via Cereal.
The value_t
type satisfy the cerealisable, if value_t
can be serialised with cereal, i.e. value_t
has a single serialisation function (serialize
) or split load/save pair (load and save) either inside or outside of the class.
- See also
- https://uscilab.github.io/cereal/serialization_functions.html
#include <cereal/types/array.hpp>
Example
#if SEQAN3_WITH_CEREAL
#include <cereal/archives/binary.hpp>
#include <cereal/types/vector.hpp>
#include <seqan3/test/tmp_filename.hpp>
{
cereal::BinaryInputArchive archive(is);
archive(data);
}
{
cereal::BinaryOutputArchive archive(os);
archive(data);
}
int main()
{
seqan3::test::tmp_filename tmp_file{"data.out"};
store(vec, tmp_file);
load(vec2, tmp_file);
return 0;
}
#endif
- Attention
- The cereal library is an optional dependency of SeqAn, if it is not found no types satisfy this concept.