Can/How do you serialize an array using the cereal library.
I.e.
void save(Archive & ar, const unsigned int version) const
{
unsigned int l = g1_size_bin(g,POINT_COMPRESS);
uint8_t data[l];
memset(data, 0, l);
g1_write_bin(data, l, g,POINT_COMPRESS);
ar(l);
ar(data); // what should be here
}
That doesn't work (nor would I expect it too). Nor does
ar(cereal::binary_data(data,l));
(which I would think would work, since it looks like the boost code one would use), which produces a compilation error :
/usr/local/include/cereal/cereal.hpp:79:17: note: candidate template ignored: substitution failure : variably modified type 'unsigned char (&)[l]' cannot be used as a template argument BinaryData binary_data( T && data, size_t size )
Nor does
ar.saveBinaryValue(data,l);
Since that method only appears to be supported for XML/Json and I want a binary archive.