cereal
cereal copied to clipboard
How to serialize struct with member datatype unsigned __int128 (using gcc)
I am encountering an error while trying to (de)serialize a struct containing data-structure of type unsigned __int128.
error: static assertion failed: cereal could not find any input serialization functions for the provided type and archive combination. 954 | static_assert(traits::detail::count_input_serializers<T, ArchiveType>::value != 0,
While using uint64_t
it works fine and has the following signature:
struct MnodeInfo {
uint64_t node;
int prefix_id;
MnodeInfo()=default;
template<class Archive>
void serialize(Archive & archive)
{
archive(node, prefix_id);
}
};
However changing uint64_t
to unsigned __int128
results in the above compile-time error.
Is there a workaround for this issue? Can cereal be used to (de)serialize non-POD datatypes?
For reference I am using cereal v1.3.0; gcc version 9.2.0. I have posted the same question on StackOverflow as well. Looking for any suggestions to resolve this issue.